 
 CREATE TABLE WORKFLOW_REQUEST_RELATION(
   RELATIONSHIP_ID VARCHAR (45) NOT NULL,
-  WORKFLOW_ID VARCHAR (45),
-  REQUEST_ID VARCHAR (45),
+  WORKFLOW_ID VARCHAR (45) NOT NULL,
+  REQUEST_ID VARCHAR (45) NOT NULL,
   UPDATED_AT TIMESTAMP,
   STATUS VARCHAR (30),
   PRIMARY KEY (RELATIONSHIP_ID),

            TOKEN_ID VARCHAR (255) NOT NULL,
            ACCESS_TOKEN VARCHAR (255) NOT NULL,
            REFRESH_TOKEN VARCHAR (255),
            CONSUMER_KEY_ID INTEGER,
            AUTHZ_USER VARCHAR (100) NOT NULL,
            TENANT_ID INTEGER,
            USER_DOMAIN VARCHAR (50) NOT NULL,
            USER_TYPE VARCHAR (25) NOT NULL,
            TIME_CREATED TIMESTAMP,

            PRIMARY KEY (TOKEN_ID),
            FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE,
            CONSTRAINT CON_APP_KEY UNIQUE (CONSUMER_KEY_ID,AUTHZ_USER,TENANT_ID,USER_DOMAIN,USER_TYPE,TOKEN_SCOPE_HASH,
                                 TOKEN_STATE,TOKEN_STATE_ID))
/

CREATE INDEX IDX_AT_CK_AU ON IDN_OAUTH2_ACCESS_TOKEN(CONSUMER_KEY_ID, AUTHZ_USER, TOKEN_STATE, USER_TYPE)
