 )/
 
 CREATE TABLE AM_GRAPHQL_COMPLEXITY (
-    UUID VARCHAR(256),
+    UUID VARCHAR(256) NOT NULL,
     API_ID INTEGER NOT NULL,
-    TYPE VARCHAR(256),
-    FIELD VARCHAR(256),
+    TYPE VARCHAR(256) NOT NULL,
+    FIELD VARCHAR(256) NOT NULL,
     COMPLEXITY_VALUE INTEGER,
-    FOREIGN KEY (API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE ON DELETE CASCADE,
+    FOREIGN KEY (API_ID) REFERENCES AM_API(API_ID) ON DELETE RESTRICT,
     PRIMARY KEY(UUID),
     UNIQUE (API_ID,TYPE,FIELD)
 )/

CREATE INDEX IDX_IDN_AUTH_TMP_SESSION_TIME ON IDN_AUTH_TEMP_SESSION_STORE (TIME_CREATED)
  /

  -- IDN_OIDC_SCOPE_CLAIM_MAPPING --
CREATE INDEX IDX_AT_SI_ECI ON IDN_OIDC_SCOPE_CLAIM_MAPPING(SCOPE_ID, EXTERNAL_CLAIM_ID)
  /

  -- IDN_OAUTH2_SCOPE --
CREATE INDEX IDX_SC_TID ON IDN_OAUTH2_SCOPE(TENANT_ID)
  /

CREATE TABLE AM_ALERT_EMAILLIST_DETAILS (
            EMAIL_LIST_ID INTEGER NOT NULL,
	    EMAIL VARCHAR(255) NOT NULL,
	        PRIMARY KEY (EMAIL_LIST_ID,EMAIL)
)/

INSERT INTO AM_ALERT_TYPES (ALERT_TYPE_NAME, STAKE_HOLDER) VALUES ('AbnormalResponseTime', 'publisher')/
