2017-05-13 03:01:43 +08:00
|
|
|
# Delayed migration steps
|
|
|
|
|
2018-03-20 15:20:50 +08:00
|
|
|
require 'migration/table_dropper'
|
2017-05-13 03:01:43 +08:00
|
|
|
|
2018-03-21 18:31:05 +08:00
|
|
|
Migration::TableDropper.delayed_rename(
|
2017-05-13 03:01:43 +08:00
|
|
|
old_name: 'topic_status_updates',
|
|
|
|
new_name: 'topic_timers',
|
|
|
|
after_migration: 'RenameTopicStatusUpdatesToTopicTimers',
|
2017-07-28 09:20:09 +08:00
|
|
|
on_drop: ->() {
|
2017-05-13 03:01:43 +08:00
|
|
|
STDERR.puts "Dropping topic_status_updates. It was moved to topic_timers."
|
|
|
|
}
|
|
|
|
)
|
2018-03-21 19:07:47 +08:00
|
|
|
|
|
|
|
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."
|
|
|
|
}
|
|
|
|
)
|
2018-04-24 21:46:57 +08:00
|
|
|
|
|
|
|
Migration::ColumnDropper.drop(
|
|
|
|
table: 'user_profiles',
|
|
|
|
after_migration: 'DropUserCardBadgeColumns',
|
|
|
|
columns: ['card_image_badge_id'],
|
|
|
|
on_drop: ->() {
|
|
|
|
STDERR.puts "Removing user_profiles column card_image_badge_id"
|
|
|
|
},
|
|
|
|
delay: 3600
|
|
|
|
)
|