mirror of
https://github.com/discourse/discourse.git
synced 2025-03-23 03:16:50 +08:00
FIX: Re-run remove flag and queued post web hook migrations.
There have been production instances where the migrations has run but the records that were meant to be deleted have not been deleted. The root cause is unknown but the migration is safe and simple to re-run. The problem is not reproducible locally so we're not spending too much time on digging up the root. Time vs business cost tradeoff. Follow-up fb15da43da1a4f8f733812dc4af455f27e756418
This commit is contained in:
parent
504b1562d5
commit
d2a0462186
@ -4,12 +4,12 @@ class RemoveFlagWebHooks < ActiveRecord::Migration[6.0]
|
||||
def up
|
||||
flag_event_type_id = 7
|
||||
|
||||
DB.exec <<~SQL
|
||||
execute <<~SQL
|
||||
DELETE FROM web_hook_event_types_hooks
|
||||
WHERE web_hook_event_type_id = #{flag_event_type_id}
|
||||
SQL
|
||||
|
||||
DB.exec <<~SQL
|
||||
execute <<~SQL
|
||||
DELETE FROM web_hook_event_types
|
||||
WHERE id = #{flag_event_type_id}
|
||||
SQL
|
@ -4,12 +4,12 @@ class RemoveQueuedPostWebHooks < ActiveRecord::Migration[6.0]
|
||||
def up
|
||||
queued_post_event_type_id = 8
|
||||
|
||||
DB.exec <<~SQL
|
||||
execute <<~SQL
|
||||
DELETE FROM web_hook_event_types_hooks
|
||||
WHERE web_hook_event_type_id = #{queued_post_event_type_id}
|
||||
SQL
|
||||
|
||||
DB.exec <<~SQL
|
||||
execute <<~SQL
|
||||
DELETE FROM web_hook_event_types
|
||||
WHERE id = #{queued_post_event_type_id}
|
||||
SQL
|
Loading…
x
Reference in New Issue
Block a user