Sha256: 6928b5b39a8ae0c58e17837cec8dcc46d4d07defa869f6adbcd525bda3007e61
Contents?: true
Size: 518 Bytes
Versions: 5
Compression:
Stored size: 518 Bytes
Contents
class AddAuthenticateToUsers < ActiveRecord::Migration<%= migration_version %> 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
5 entries across 5 versions & 1 rubygems