mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 02:19:27 +08:00
Drop EmailLogs#topic_id
.
This commit is contained in:
parent
7a2bf8e368
commit
01a63f8b4b
|
@ -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
|
Loading…
Reference in New Issue
Block a user