<reponame>umpox/sourcegraph<filename>migrations/frontend/1648051770/up.sql
-- Perform migration here.
--
-- See /migrations/README.md. Highlights:
--  * Make migrations idempotent (use IF EXISTS)
--  * Make migrations backwards-compatible (old readers/writers must continue to work)
--  * If you are using CREATE INDEX CONCURRENTLY, then make sure that only one statement
--    is defined per file, and that each such statement is NOT wrapped in a transaction.
--    Each such migration must also declare "createIndexConcurrently: true" in their
--    associated metadata.yaml file.
--  * If you are modifying Postgres extensions, you must also declare "privileged: true"
--    in the associated metadata.yaml file.

ALTER TABLE feature_flag_overrides
    DROP CONSTRAINT feature_flag_overrides_flag_name_fkey;

ALTER TABLE feature_flag_overrides
    ADD CONSTRAINT feature_flag_overrides_flag_name_fkey
    FOREIGN KEY (flag_name)
    REFERENCES feature_flags(flag_name)
    ON DELETE CASCADE
    ON UPDATE CASCADE;

