ALTER TABLE kol_usage_logs
    DROP CONSTRAINT IF EXISTS fk_kol_usage_logs_prompt_revision;

ALTER TABLE kol_usage_logs
    ADD CONSTRAINT fk_kol_usage_logs_prompt_revision
    FOREIGN KEY (prompt_id, prompt_revision_no)
    REFERENCES kol_prompt_revisions(prompt_id, revision_no);

ALTER TABLE kol_prompts
    DROP COLUMN IF EXISTS card_config_json,
    DROP COLUMN IF EXISTS schema_json,
    DROP COLUMN IF EXISTS prompt_asset_key;
