Sha256: 2d59ed9949153292af50653575a651d5872307b89fa4f9482487992d6c8e8802
Contents?: true
Size: 494 Bytes
Versions: 9
Compression:
Stored size: 494 Bytes
Contents
class AddAuthenticateToUsers < ActiveRecord::Migration def self.up change_table :<%= table_name %> do |t| <% config[:new_columns].values.each do |column| -%> <%= column %> <% end -%> end <% config[:new_indexes].values.each do |index| -%> <%= index %> <% end -%> end def self.down change_table :<%= table_name %> do |t| <% if config[:new_columns].any? -%> t.remove <%= new_columns.keys.map { |column| ":#{column}" }.join(", ") %> <% end -%> end end end
Version data entries
9 entries across 9 versions & 1 rubygems