H-60: harden Captain migration rollback and concurrency (#10)
Co-authored-by: Rogee <rogee@ipao.vip>
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
DROP INDEX IF EXISTS idx_captain_inboxes_active_inbox;
|
||||
DROP INDEX IF EXISTS idx_agent_bot_inboxes_bot_inbox;
|
||||
DROP INDEX IF EXISTS idx_agent_bots_captain_assistant;
|
||||
ALTER TABLE agent_bots DROP COLUMN IF EXISTS captain_assistant_id;
|
||||
-- The up migration merges duplicate bots/bindings and rewrites references.
|
||||
-- Those deleted rows and original references cannot be reconstructed safely.
|
||||
DO $$
|
||||
BEGIN
|
||||
RAISE EXCEPTION 'migration 000079 is irreversible: restore from backup instead of migrating down';
|
||||
END
|
||||
$$;
|
||||
|
||||
Reference in New Issue
Block a user