2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-10-08 03:47:38 -04:00
|
|
|
require 'migration/table_dropper'
|
|
|
|
|
|
|
|
class RemoveSuperfluousTables < ActiveRecord::Migration[5.2]
|
2019-08-08 10:06:27 -04:00
|
|
|
DROPPED_TABLES ||= %i{
|
2018-10-08 03:47:38 -04:00
|
|
|
category_featured_users
|
|
|
|
versions
|
|
|
|
topic_status_updates
|
2019-08-08 10:06:27 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
def up
|
|
|
|
DROPPED_TABLES.each do |table|
|
2018-10-08 03:47:38 -04:00
|
|
|
Migration::TableDropper.execute_drop(table)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
raise ActiveRecord::IrreversibleMigration
|
|
|
|
end
|
|
|
|
end
|