2019-07-19 01:59:12 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'migration/column_dropper'
|
|
|
|
|
|
|
|
class RemoveViaEmailFromInvite < ActiveRecord::Migration[5.2]
|
2019-08-08 10:06:27 -04:00
|
|
|
DROPPED_COLUMNS ||= {
|
|
|
|
invites: %i{via_email}
|
|
|
|
}
|
|
|
|
|
2019-07-19 01:59:12 -04:00
|
|
|
def up
|
2019-08-08 10:06:27 -04:00
|
|
|
DROPPED_COLUMNS.each do |table, columns|
|
|
|
|
Migration::ColumnDropper.execute_drop(table, columns)
|
|
|
|
end
|
2019-07-19 01:59:12 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
raise ActiveRecord::IrreversibleMigration
|
|
|
|
end
|
|
|
|
end
|