Files
xinmi/migrations/versioned/000194_instruction_skills.down.sql
T

8 lines
523 B
SQL
Raw Normal View History

-- Refuse a downgrade that would lose the distinction between private owners.
CREATE UNIQUE INDEX uq_tenant_skill_catalog_legacy_check ON tenant_skill_catalog(tenant_id, name) WHERE deleted_at IS NULL;
DROP INDEX uq_tenant_instruction_skill_owner_name;
DROP INDEX uq_tenant_skill_catalog_name;
ALTER INDEX uq_tenant_skill_catalog_legacy_check RENAME TO uq_tenant_skill_catalog_name;
ALTER TABLE tenant_skill_catalog DROP COLUMN IF EXISTS instruction_only;
ALTER TABLE tenant_skill_catalog DROP COLUMN IF EXISTS created_by;