 
 IF NOT EXISTS ( SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[CM_SP_PURPOSE_ASSOC]') AND TYPE IN (N'U'))
 CREATE TABLE CM_SP_PURPOSE_ASSOC (
-  ID                     INTEGER      NOT NULL  IDENTITY,
+  ID                     INTEGER      NOT NULL  IDENTITY(1,1),
   RECEIPT_SP_ASSOC       INTEGER      NOT NULL,
   PURPOSE_ID             INTEGER      NOT NULL,
   CONSENT_TYPE           VARCHAR(255) NOT NULL,


IF NOT EXISTS(SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[SP_TEMPLATE]') AND TYPE IN (N'U'))
CREATE TABLE SP_TEMPLATE (
  ID          INTEGER NOT NULL IDENTITY,
  TENANT_ID  INTEGER  NOT NULL,
  NAME VARCHAR(255) NOT NULL,
  DESCRIPTION VARCHAR(1023),


IF NOT EXISTS ( SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_UMA_PERMISSION_TICKET]') AND TYPE IN (N'U'))
CREATE TABLE IDN_UMA_PERMISSION_TICKET (
  ID INTEGER IDENTITY(1,1) NOT NULL,
  PT VARCHAR(255) NOT NULL,
  TIME_CREATED DATETIME NOT NULL,
  EXPIRY_TIME DATETIME NOT NULL,
