--- crms-enabled

ALTER TABLE crms
  ADD enabled NUMBER(1);

UPDATE crms
SET enabled = 1;

ALTER TABLE crms
  MODIFY enabled NUMBER(1) NOT NULL;

DROP INDEX crms_uniq;

CREATE UNIQUE INDEX crms_project_enabled_uniq
  ON crms (
    CASE WHEN enabled = 1
      THEN project_id END);
