 
 --TODO: Have to add ON UPDATE CASCADE for the FOREIGN KEY(APPLICATION_ID) relation
 CREATE TABLE AM_APPLICATION_KEY_MAPPING (
-    UUID VARCHAR2(512),
+    UUID VARCHAR2(100),
     APPLICATION_ID INTEGER,
     CONSUMER_KEY VARCHAR2(512),
     KEY_TYPE VARCHAR2(512) NOT NULL,
     CREATE_MODE VARCHAR2(30) DEFAULT 'CREATED',
     STATE VARCHAR2(30) NOT NULL,
-    KEY_MANAGER VARCHAR2(512),
+    KEY_MANAGER VARCHAR2(100),
     APP_INFO BLOB DEFAULT NULL,
     FOREIGN KEY(APPLICATION_ID) REFERENCES AM_APPLICATION(APPLICATION_ID),
     PRIMARY KEY(APPLICATION_ID,KEY_TYPE,KEY_MANAGER)

    PRIMARY KEY(URL_MAPPING_ID)
)
/
CREATE TABLE AM_SECURITY_AUDIT_UUID_MAPPING (
    API_ID INTEGER NOT NULL,
    AUDIT_UUID VARCHAR(255) NOT NULL,

    TENANT_ID INTEGER,
    TENANT_DOMAIN VARCHAR(255),
    WF_EXTERNAL_REFERENCE VARCHAR(255) NOT NULL UNIQUE,
    WF_METADATA BLOB DEFAULT NULL,
    WF_PROPERTIES BLOB DEFAULT NULL,
    PRIMARY KEY (WF_ID)
)
/

CREATE TABLE AM_SHARED_SCOPE (
   NAME VARCHAR(255),
   UUID VARCHAR (256),
   TENANT_ID INTEGER,
   PRIMARY KEY (UUID)
)
/

