-- This file is automatically generated using maintenance/generateSchemaChangeSql.php.
-- Source: schema/abstractSchemaChanges/patch-cusi_case-def.json
-- Do not modify this file directly.
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes
CREATE TABLE cusi_case (
  sic_id SERIAL NOT NULL,
  sic_status SMALLINT DEFAULT 0 NOT NULL,
  sic_status_reason TEXT DEFAULT '' NOT NULL,
  sic_created_timestamp TIMESTAMPTZ NOT NULL,
  PRIMARY KEY(sic_id)
);

CREATE UNIQUE INDEX sic_status_created_timestamp_id ON cusi_case (
  sic_status, sic_created_timestamp,
  sic_id
);

CREATE UNIQUE INDEX sic_created_timestamp_id ON cusi_case (sic_created_timestamp, sic_id);
