FIX: Drop unused tables with a delay
This commit is contained in:
parent
d96c1058a2
commit
43f63c435d
|
@ -10,3 +10,19 @@ Migration::TableDropper.delayed_rename(
|
||||||
STDERR.puts "Dropping topic_status_updates. It was moved to topic_timers."
|
STDERR.puts "Dropping topic_status_updates. It was moved to topic_timers."
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Migration::TableDropper.delayed_drop(
|
||||||
|
table_name: 'category_featured_users',
|
||||||
|
after_migration: 'DropUnusedTables',
|
||||||
|
on_drop: ->() {
|
||||||
|
STDERR.puts "Dropping category_featured_users. It isn't used anymore."
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
Migration::TableDropper.delayed_drop(
|
||||||
|
table_name: 'versions',
|
||||||
|
after_migration: 'DropUnusedTables',
|
||||||
|
on_drop: ->() {
|
||||||
|
STDERR.puts "Dropping versions. It isn't used anymore."
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
class DropUnusedTables < ActiveRecord::Migration[5.1]
|
class DropUnusedTables < ActiveRecord::Migration[5.1]
|
||||||
def up
|
def up
|
||||||
drop_table :category_featured_users
|
# Delayed drop of tables "category_featured_users" and "versions"
|
||||||
drop_table :versions
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
|
|
Loading…
Reference in New Issue