mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 11:14:42 +08:00
Drop EmailLogs#topic_id
.
This commit is contained in:
@ -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
|
||||
|
5
db/migrate/20180724070554_drop_topic_id_on_email_logs.rb
Normal file
5
db/migrate/20180724070554_drop_topic_id_on_email_logs.rb
Normal file
@ -0,0 +1,5 @@
|
||||
class DropTopicIdOnEmailLogs < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
remove_index :email_logs, :topic_id
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user