Skip to content
Clone
bfb28e3
17 lines 898 B SQL
-- schema_pre_sync.sql
-- Drops partial unique indexes created by schema_extras.sql before every
-- sea-orm schema sync. The sync layer cannot express partial predicates via
-- entity attributes, and treats these manually-created unique indexes as
-- stale constraints (DROP CONSTRAINT), which fails because they are plain
-- indexes. schema_extras.sql recreates all of them after the sync succeeds.
DROP INDEX IF EXISTS idx_issue_watch_issue_user;
DROP INDEX IF EXISTS idx_issue_watch_project_user;
DROP INDEX IF EXISTS idx_issue_reaction_issue;
DROP INDEX IF EXISTS idx_issue_reaction_comment;
DROP INDEX IF EXISTS idx_issue_reaction_project;
DROP INDEX IF EXISTS idx_branch_protection_whitelist_user;
DROP INDEX IF EXISTS idx_branch_protection_whitelist_group;
DROP INDEX IF EXISTS idx_chat_message_room_nonce;
DROP INDEX IF EXISTS idx_chat_dm_pair;
DROP INDEX IF EXISTS idx_chat_draft_unique;