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 fb15da43da
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…
Reference in New Issue