--- crms-enabled

ALTER TABLE crms
  ADD enabled BIT;

UPDATE crms
SET enabled = 1;

ALTER TABLE crms
  ALTER COLUMN enabled BIT NOT NULL;

DROP INDEX crms.crms_uniq;

CREATE UNIQUE INDEX crms_project_enabled_uniq
  ON crms (project_id)
  WHERE enabled = 1;
