Files
coder/coderd/database/migrations/000026_allow_template_name_re_use.up.sql
2022-06-17 19:18:07 +00:00

6 lines
286 B
SQL

DROP INDEX idx_templates_name_lower;
DROP INDEX templates_organization_id_name_idx;
CREATE UNIQUE INDEX templates_organization_id_name_idx ON templates (organization_id, lower(name)) WHERE deleted = false;
ALTER TABLE ONLY templates DROP CONSTRAINT templates_organization_id_name_key;