Drop EmailLogs#topic_id.

This commit is contained in:
Guo Xiang Tan 2018-07-24 15:18:57 +08:00
parent 7a2bf8e368
commit 01a63f8b4b
2 changed files with 16 additions and 0 deletions

View File

@ -239,4 +239,15 @@ Migration::ColumnDropper.drop(
}
)
Migration::ColumnDropper.drop(
table: 'email_logs',
after_migration: 'DropTopicIdOnEmailLogs',
columns: %w{
topic_id
},
on_drop: ->() {
STDERR.puts "Removing superflous email_logs columns!"
}
)
Discourse.reset_active_record_cache

View File

@ -0,0 +1,5 @@
class DropTopicIdOnEmailLogs < ActiveRecord::Migration[5.2]
def change
remove_index :email_logs, :topic_id
end
end