
jbe@74: BEGIN;
jbe@74:  
jbe@74: CREATE OR REPLACE VIEW "liquid_feedback_version" AS
jbe@74:   SELECT * FROM (VALUES ('1.2.8', 1, 2, 8))
jbe@74:   AS "subquery"("string", "major", "minor", "revision");
jbe@74: 
jbe@74: ALTER TABLE "delegation" DROP CONSTRAINT "delegation_area_id_key";
jbe@74: ALTER TABLE "delegation" DROP CONSTRAINT "delegation_issue_id_key";
jbe@74: DROP INDEX "delegation_global_truster_id_trustee_id_unique_idx";
jbe@74: 
jbe@74: ALTER TABLE "delegation" ADD UNIQUE ("area_id", "truster_id");
jbe@74: ALTER TABLE "delegation" ADD UNIQUE ("issue_id", "truster_id");
jbe@75: CREATE UNIQUE INDEX "delegation_global_truster_id_unique_idx"
jbe@74:   ON "delegation" ("truster_id") WHERE "scope" = 'global';
jbe@74: 
jbe@74: COMMIT;




