CREATE TABLE ERROR_REPOSITORY (
  ID          NUMBER        NOT NULL,
  DESCRIPTION VARCHAR2(500) NOT NULL,
  REASON      CLOB          NOT NULL,
  RESOLUTION  CLOB          NOT NULL,
  TYPE        VARCHAR2(1)   NOT NULL,
  IS_ACTIVE   VARCHAR2(1)   DEFAULT 'Y' NOT NULL,
  
  ORGANIZATION_ID NUMBER NOT NULL,
  CREATED_BY      NUMBER,
  CREATED         DATE DEFAULT SYSDATE NOT NULL,
  UPDATED_BY      NUMBER,
  UPDATED         DATE DEFAULT SYSDATE NOT NULL,
  
  CONSTRAINT PK_ERROR_REPOSITORY     PRIMARY KEY(ID),
  CONSTRAINT CKC_ERROR_REP_IS_ACTIVE CHECK (IS_ACTIVE IN ('Y', 'N'))
)
/
CREATE SEQUENCE ERROR_REPOSITORY_ID_SEQ START WITH 1 MINVALUE 1 INCREMENT BY 1