Sha256: 3fa70f86e3db49c8461c7fd49660a6ea506243415d5699ebe51a5002da647bf7
Contents?: true
Size: 467 Bytes
Versions: 10
Compression:
Stored size: 467 Bytes
Contents
class AddClearanceToUsers < ActiveRecord::Migration def self.up change_table :users 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 :users do |t| <% if config[:new_columns].any? -%> t.remove <%= new_columns.keys.map { |column| ":#{column}" }.join(',') %> <% end -%> end end end
Version data entries
10 entries across 10 versions & 1 rubygems