
  CREATE TABLE "BONSAILIMS"."CORE_COLLECTIONMETHOD" 
   (	"ID" NUMBER(11,0) NOT NULL ENABLE, 
	"NAME" NVARCHAR2(30), 
	 PRIMARY KEY ("ID")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS"  ENABLE
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 

  CREATE OR REPLACE TRIGGER "BONSAILIMS"."CORE_COLLECTIONMETHOD_TR" 
BEFORE INSERT ON "CORE_COLLECTIONMETHOD"
FOR EACH ROW
 WHEN (new."ID" IS NULL) BEGIN
        SELECT "CORE_COLLECTIONMETHOD_SQ".nextval
        INTO :new."ID" FROM dual;
    END;

/
ALTER TRIGGER "BONSAILIMS"."CORE_COLLECTIONMETHOD_TR" ENABLE;
 

  CREATE TABLE "BONSAILIMS"."CORE_MATERIAL" 
   (	"ID" NUMBER(11,0) NOT NULL ENABLE, 
	"NAME" NVARCHAR2(45), 
	 PRIMARY KEY ("ID")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS"  ENABLE
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 

  CREATE OR REPLACE TRIGGER "BONSAILIMS"."CORE_MATERIAL_TR" 
BEFORE INSERT ON "CORE_MATERIAL"
FOR EACH ROW
 WHEN (new."ID" IS NULL) BEGIN
        SELECT "CORE_MATERIAL_SQ".nextval
        INTO :new."ID" FROM dual;
    END;

/
ALTER TRIGGER "BONSAILIMS"."CORE_MATERIAL_TR" ENABLE;
 

  CREATE TABLE "BONSAILIMS"."CORE_PROJECT" 
   (	"ID" NUMBER(11,0) NOT NULL ENABLE, 
	"DESCRIPTION" NVARCHAR2(255), 
	"DATE_TIME_LAST_UPDATED" TIMESTAMP (6) NOT NULL ENABLE, 
	"DMS_LINK" NVARCHAR2(255), 
	"FOLIOTRACKER_LINK" NVARCHAR2(255), 
	"LAST_UPDATED_BY_ID" NUMBER(11,0) NOT NULL ENABLE, 
	"PROJECT_CODE_ID" NUMBER(11,0) NOT NULL ENABLE, 
	"CREATED_BY_ID" NUMBER(11,0), 
	"DATE_TIME_CREATED" TIMESTAMP (6), 
	 PRIMARY KEY ("ID")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS"  ENABLE, 
	 FOREIGN KEY ("LAST_UPDATED_BY_ID")
	  REFERENCES "BONSAILIMS"."AUTH_USER" ("ID") ON DELETE SET NULL ENABLE, 
	 CONSTRAINT "CORE_PROJECT_USER_FK" FOREIGN KEY ("CREATED_BY_ID")
	  REFERENCES "BONSAILIMS"."AUTH_USER" ("ID") ON DELETE SET NULL ENABLE, 
	 FOREIGN KEY ("PROJECT_CODE_ID")
	  REFERENCES "BONSAILIMS"."CORE_PROJECTCODE" ("ID") ON DELETE SET NULL ENABLE
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 

  CREATE INDEX "BONSAILIMS"."CORE_PROJECT_LAST_UPDATED_D196" ON "BONSAILIMS"."CORE_PROJECT" ("LAST_UPDATED_BY_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 
  CREATE INDEX "BONSAILIMS"."CORE_PROJECT_PROJECT_CODE_ID" ON "BONSAILIMS"."CORE_PROJECT" ("PROJECT_CODE_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 
  CREATE UNIQUE INDEX "BONSAILIMS"."SYS_C0031256" ON "BONSAILIMS"."CORE_PROJECT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 

  CREATE OR REPLACE TRIGGER "BONSAILIMS"."CORE_PROJECT_TR" 
BEFORE INSERT ON "CORE_PROJECT"
FOR EACH ROW
 WHEN (new."ID" IS NULL) BEGIN
        SELECT "CORE_PROJECT_SQ".nextval
        INTO :new."ID" FROM dual;
    END;

/
ALTER TRIGGER "BONSAILIMS"."CORE_PROJECT_TR" ENABLE;
 

  CREATE TABLE "BONSAILIMS"."CORE_PROJECT_SUBSCRIBERS" 
   (	"ID" NUMBER(11,0) NOT NULL ENABLE, 
	"PROJECT_ID" NUMBER(11,0) NOT NULL ENABLE, 
	"USER_ID" NUMBER(11,0) NOT NULL ENABLE, 
	 PRIMARY KEY ("ID")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS"  ENABLE, 
	 FOREIGN KEY ("USER_ID")
	  REFERENCES "BONSAILIMS"."AUTH_USER" ("ID") ON DELETE CASCADE ENABLE, 
	 FOREIGN KEY ("PROJECT_ID")
	  REFERENCES "BONSAILIMS"."CORE_PROJECT" ("ID") ON DELETE CASCADE ENABLE
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 

  CREATE INDEX "BONSAILIMS"."CORE_PROJECT_SUBSCRIBERS_P8124" ON "BONSAILIMS"."CORE_PROJECT_SUBSCRIBERS" ("PROJECT_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 
  CREATE INDEX "BONSAILIMS"."CORE_PROJECT_SUBSCRIBERS_U7781" ON "BONSAILIMS"."CORE_PROJECT_SUBSCRIBERS" ("USER_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 
  CREATE UNIQUE INDEX "BONSAILIMS"."SYS_C0032726" ON "BONSAILIMS"."CORE_PROJECT_SUBSCRIBERS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 

  CREATE OR REPLACE TRIGGER "BONSAILIMS"."CORE_PROJECT_SUBSCRIBERS_TR" 
BEFORE INSERT ON "CORE_PROJECT_SUBSCRIBERS"
FOR EACH ROW
 WHEN (new."ID" IS NULL) BEGIN
        SELECT "CORE_PROJECT_SUBSCRIBERS_SQ".nextval
        INTO :new."ID" FROM dual;
    END;

/
ALTER TRIGGER "BONSAILIMS"."CORE_PROJECT_SUBSCRIBERS_TR" ENABLE;
 

  CREATE TABLE "BONSAILIMS"."CORE_PROJECTCODE" 
   (	"ID" NUMBER(11,0) NOT NULL ENABLE, 
	"NAME" NVARCHAR2(30), 
	 PRIMARY KEY ("ID")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS"  ENABLE
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 

  CREATE OR REPLACE TRIGGER "BONSAILIMS"."CORE_PROJECTCODE_TR" 
BEFORE INSERT ON "CORE_PROJECTCODE"
FOR EACH ROW
 WHEN (new."ID" IS NULL) BEGIN
        SELECT "CORE_PROJECTCODE_SQ".nextval
        INTO :new."ID" FROM dual;
    END;

/
ALTER TRIGGER "BONSAILIMS"."CORE_PROJECTCODE_TR" ENABLE;
 

  CREATE TABLE "BONSAILIMS"."CORE_SAMPLE" 
   (	"ID" NUMBER(11,0) NOT NULL DISABLE, 
	"BARCODE_NO" NVARCHAR2(45), 
	"COLLECTION_METHOD_ID" NUMBER(11,0), 
	"DATE_TIME_COLLECTED" TIMESTAMP (6), 
	"DATE_TIME_DESTROYED" TIMESTAMP (6), 
	"DATE_TIME_FROZEN" TIMESTAMP (6), 
	"DATE_TIME_LAST_UPDATED" TIMESTAMP (6) NOT NULL DISABLE, 
	"DMS_SAMPLE_INFO_SHEET_LINK" NVARCHAR2(255), 
	"EXTERNAL_SAMPLE_ID" NVARCHAR2(255), 
	"FREEZER_LOCATION" NVARCHAR2(20), 
	"FREEZE_METHOD" VARCHAR2(20 BYTE), 
	"LAST_UPDATED_BY_ID" NUMBER(11,0) NOT NULL DISABLE, 
	"MATERIAL_ID" NUMBER(11,0), 
	"SUBJECT_ID" NUMBER(11,0), 
	"STORAGE_METHOD_ID" NUMBER(11,0), 
	"ALIQUOT_NO" NUMBER, 
	"CREATED_BY_ID" NUMBER(11,0), 
	"DATE_TIME_CREATED" TIMESTAMP (6), 
	 PRIMARY KEY ("ID")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS"  ENABLE, 
	 FOREIGN KEY ("SUBJECT_ID")
	  REFERENCES "BONSAILIMS"."CORE_SUBJECT" ("ID") ON DELETE CASCADE ENABLE, 
	 FOREIGN KEY ("LAST_UPDATED_BY_ID")
	  REFERENCES "BONSAILIMS"."AUTH_USER" ("ID") ON DELETE SET NULL ENABLE, 
	 FOREIGN KEY ("STORAGE_METHOD_ID")
	  REFERENCES "BONSAILIMS"."CORE_STORAGEMETHOD" ("ID") ON DELETE SET NULL ENABLE, 
	 FOREIGN KEY ("COLLECTION_METHOD_ID")
	  REFERENCES "BONSAILIMS"."CORE_COLLECTIONMETHOD" ("ID") ON DELETE SET NULL ENABLE, 
	 FOREIGN KEY ("MATERIAL_ID")
	  REFERENCES "BONSAILIMS"."CORE_MATERIAL" ("ID") ON DELETE SET NULL DISABLE, 
	 CONSTRAINT "CREATED_BY_ID_USER_ID_FK1" FOREIGN KEY ("CREATED_BY_ID")
	  REFERENCES "BONSAILIMS"."AUTH_USER" ("ID") ON DELETE SET NULL DISABLE
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 

  CREATE INDEX "BONSAILIMS"."CORE_SAMPLE_COLLECTION_MET335C" ON "BONSAILIMS"."CORE_SAMPLE" ("COLLECTION_METHOD_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 
  CREATE INDEX "BONSAILIMS"."CORE_SAMPLE_FREEZE_METHOD_ID" ON "BONSAILIMS"."CORE_SAMPLE" ("FREEZE_METHOD") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 
  CREATE INDEX "BONSAILIMS"."CORE_SAMPLE_LAST_UPDATED_BY_ID" ON "BONSAILIMS"."CORE_SAMPLE" ("LAST_UPDATED_BY_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 
  CREATE INDEX "BONSAILIMS"."CORE_SAMPLE_MATERIAL_ID" ON "BONSAILIMS"."CORE_SAMPLE" ("MATERIAL_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 
  CREATE INDEX "BONSAILIMS"."CORE_SAMPLE_STORAGE_METHOD_ID" ON "BONSAILIMS"."CORE_SAMPLE" ("STORAGE_METHOD_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 
  CREATE INDEX "BONSAILIMS"."CORE_SAMPLE_SUBJECT_ID" ON "BONSAILIMS"."CORE_SAMPLE" ("SUBJECT_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 
  CREATE UNIQUE INDEX "BONSAILIMS"."SYS_C0031279" ON "BONSAILIMS"."CORE_SAMPLE" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 

  CREATE OR REPLACE TRIGGER "BONSAILIMS"."CORE_SAMPLE_TR" 
BEFORE INSERT ON "CORE_SAMPLE"
FOR EACH ROW
 WHEN (new."ID" IS NULL) BEGIN
        SELECT "CORE_SAMPLE_SQ".nextval
        INTO :new."ID" FROM dual;
    END;

/
ALTER TRIGGER "BONSAILIMS"."CORE_SAMPLE_TR" ENABLE;
 

  CREATE TABLE "BONSAILIMS"."CORE_SAMPLE_SUBSCRIBERS" 
   (	"ID" NUMBER(11,0) NOT NULL ENABLE, 
	"SAMPLE_ID" NUMBER(11,0) NOT NULL ENABLE, 
	"USER_ID" NUMBER(11,0) NOT NULL ENABLE, 
	 PRIMARY KEY ("ID")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS"  ENABLE, 
	 FOREIGN KEY ("SAMPLE_ID")
	  REFERENCES "BONSAILIMS"."CORE_SAMPLE" ("ID") ON DELETE CASCADE ENABLE, 
	 FOREIGN KEY ("USER_ID")
	  REFERENCES "BONSAILIMS"."AUTH_USER" ("ID") ON DELETE CASCADE ENABLE
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 

  CREATE INDEX "BONSAILIMS"."CORE_SAMPLE_SUBSCRIBERS_SA3E89" ON "BONSAILIMS"."CORE_SAMPLE_SUBSCRIBERS" ("SAMPLE_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 
  CREATE INDEX "BONSAILIMS"."CORE_SAMPLE_SUBSCRIBERS_US9FE7" ON "BONSAILIMS"."CORE_SAMPLE_SUBSCRIBERS" ("USER_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 
  CREATE UNIQUE INDEX "BONSAILIMS"."SYS_C0032912" ON "BONSAILIMS"."CORE_SAMPLE_SUBSCRIBERS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 

  CREATE OR REPLACE TRIGGER "BONSAILIMS"."CORE_SAMPLE_SUBSCRIBERS_TR" 
            BEFORE INSERT ON "CORE_SAMPLE_SUBSCRIBERS"
            FOR EACH ROW
             WHEN (new."ID" IS NULL) BEGIN
                    SELECT CORE_SAMPLE_SUBSCRIBERS_SQ.nextval
                    INTO :new."ID" FROM dual;
                END;
                
/
ALTER TRIGGER "BONSAILIMS"."CORE_SAMPLE_SUBSCRIBERS_TR" ENABLE;
 

  CREATE TABLE "BONSAILIMS"."CORE_STORAGEMETHOD" 
   (	"ID" NUMBER(11,0) NOT NULL ENABLE, 
	"NAME" NVARCHAR2(20), 
	 PRIMARY KEY ("ID")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS"  ENABLE
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 

  CREATE OR REPLACE TRIGGER "BONSAILIMS"."CORE_STORAGEMETHOD_TR" 
BEFORE INSERT ON "CORE_STORAGEMETHOD"
FOR EACH ROW
 WHEN (new."ID" IS NULL) BEGIN
        SELECT "CORE_STORAGEMETHOD_SQ".nextval
        INTO :new."ID" FROM dual;
    END;

/
ALTER TRIGGER "BONSAILIMS"."CORE_STORAGEMETHOD_TR" ENABLE;
 

  CREATE TABLE "BONSAILIMS"."CORE_SUBJECT" 
   (	"ID" NUMBER(11,0) NOT NULL ENABLE, 
	"AGE" NUMBER(3,0), 
	"DONOR_ID" NVARCHAR2(45), 
	"DATE_TIME_LAST_UPDATED" TIMESTAMP (6) NOT NULL ENABLE, 
	"GENDER" NVARCHAR2(4), 
	"LAST_UPDATED_BY_ID" NUMBER(11,0) NOT NULL ENABLE, 
	"PROJECT_ID" NUMBER(11,0) NOT NULL ENABLE, 
	"CREATED_BY_ID" NUMBER(11,0), 
	"DATE_TIME_CREATED" TIMESTAMP (6), 
	 PRIMARY KEY ("ID")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS"  ENABLE, 
	 FOREIGN KEY ("PROJECT_ID")
	  REFERENCES "BONSAILIMS"."CORE_PROJECT" ("ID") ON DELETE CASCADE ENABLE, 
	 CONSTRAINT "CORE_SUBJECT_USER_FK1" FOREIGN KEY ("CREATED_BY_ID")
	  REFERENCES "BONSAILIMS"."AUTH_USER" ("ID") ON DELETE SET NULL ENABLE, 
	 FOREIGN KEY ("LAST_UPDATED_BY_ID")
	  REFERENCES "BONSAILIMS"."AUTH_USER" ("ID") ON DELETE SET NULL ENABLE
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 

  CREATE INDEX "BONSAILIMS"."CORE_SUBJECT_LAST_UPDATED_53D0" ON "BONSAILIMS"."CORE_SUBJECT" ("LAST_UPDATED_BY_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 
  CREATE INDEX "BONSAILIMS"."CORE_SUBJECT_PROJECT_ID" ON "BONSAILIMS"."CORE_SUBJECT" ("PROJECT_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 
  CREATE UNIQUE INDEX "BONSAILIMS"."SYS_C0031264" ON "BONSAILIMS"."CORE_SUBJECT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 

  CREATE OR REPLACE TRIGGER "BONSAILIMS"."CORE_SUBJECT_TR" 
BEFORE INSERT ON "CORE_SUBJECT"
FOR EACH ROW
 WHEN (new."ID" IS NULL) BEGIN
        SELECT "CORE_SUBJECT_SQ".nextval
        INTO :new."ID" FROM dual;
    END;

/
ALTER TRIGGER "BONSAILIMS"."CORE_SUBJECT_TR" ENABLE;
 

  CREATE TABLE "BONSAILIMS"."CORE_SUBJECT_SUBSCRIBERS" 
   (	"ID" NUMBER(11,0) NOT NULL ENABLE, 
	"SUBJECT_ID" NUMBER(11,0) NOT NULL ENABLE, 
	"USER_ID" NUMBER(11,0) NOT NULL ENABLE, 
	 PRIMARY KEY ("ID")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS"  ENABLE, 
	 FOREIGN KEY ("SUBJECT_ID")
	  REFERENCES "BONSAILIMS"."CORE_SUBJECT" ("ID") ON DELETE CASCADE ENABLE, 
	 FOREIGN KEY ("USER_ID")
	  REFERENCES "BONSAILIMS"."AUTH_USER" ("ID") ON DELETE CASCADE ENABLE
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 

  CREATE INDEX "BONSAILIMS"."CORE_SUBJECT_SUBSCRIBERS_S8992" ON "BONSAILIMS"."CORE_SUBJECT_SUBSCRIBERS" ("SUBJECT_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 
  CREATE INDEX "BONSAILIMS"."CORE_SUBJECT_SUBSCRIBERS_U4A45" ON "BONSAILIMS"."CORE_SUBJECT_SUBSCRIBERS" ("USER_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 
  CREATE UNIQUE INDEX "BONSAILIMS"."SYS_C0032906" ON "BONSAILIMS"."CORE_SUBJECT_SUBSCRIBERS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 

  CREATE OR REPLACE TRIGGER "BONSAILIMS"."CORE_SUBJECT_SUBSCRIBERS_TR" 
            BEFORE INSERT ON "CORE_SUBJECT_SUBSCRIBERS"
            FOR EACH ROW
             WHEN (new."ID" IS NULL) BEGIN
                    SELECT CORE_SUBJECT_SUBSCRIBERS_SQ.nextval
                    INTO :new."ID" FROM dual;
                END;
                
/
ALTER TRIGGER "BONSAILIMS"."CORE_SUBJECT_SUBSCRIBERS_TR" ENABLE;
 

  CREATE TABLE "BONSAILIMS"."CORE_USERPROFILE" 
   (	"ID" NUMBER(11,0) NOT NULL ENABLE, 
	"USER_ID" NUMBER(11,0) NOT NULL ENABLE, 
	"LIST_PER_PAGE" NUMBER(11,0) NOT NULL ENABLE, 
	 PRIMARY KEY ("ID")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS"  ENABLE, 
	 UNIQUE ("USER_ID")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS"  ENABLE, 
	 FOREIGN KEY ("USER_ID")
	  REFERENCES "BONSAILIMS"."AUTH_USER" ("ID") DEFERRABLE INITIALLY DEFERRED ENABLE
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 

  CREATE UNIQUE INDEX "BONSAILIMS"."SYS_C0033157" ON "BONSAILIMS"."CORE_USERPROFILE" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 
  CREATE UNIQUE INDEX "BONSAILIMS"."SYS_C0033158" ON "BONSAILIMS"."CORE_USERPROFILE" ("USER_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 

  CREATE OR REPLACE TRIGGER "BONSAILIMS"."CORE_USERPROFILE_TR" 
            BEFORE INSERT ON "CORE_USERPROFILE"
            FOR EACH ROW
             WHEN (new."ID" IS NULL) BEGIN
                    SELECT CORE_USERPROFILE_SQ.nextval
                    INTO :new."ID" FROM dual;
                END;
                
/
ALTER TRIGGER "BONSAILIMS"."CORE_USERPROFILE_TR" ENABLE;
 

  CREATE TABLE "BONSAILIMS"."DJANGO_SITE" 
   (	"ID" NUMBER(11,0) NOT NULL ENABLE, 
	"DOMAIN" NVARCHAR2(100), 
	"NAME" NVARCHAR2(50), 
	 PRIMARY KEY ("ID")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS"  ENABLE
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 

  CREATE OR REPLACE TRIGGER "BONSAILIMS"."DJANGO_SITE_TR" 
BEFORE INSERT ON "DJANGO_SITE"
FOR EACH ROW
 WHEN (new."ID" IS NULL) BEGIN
        SELECT "DJANGO_SITE_SQ".nextval
        INTO :new."ID" FROM dual;
    END;

/
ALTER TRIGGER "BONSAILIMS"."DJANGO_SITE_TR" ENABLE;
 

  CREATE TABLE "BONSAILIMS"."DJANGO_SESSION" 
   (	"SESSION_KEY" NVARCHAR2(40), 
	"SESSION_DATA" NCLOB, 
	"EXPIRE_DATE" TIMESTAMP (6) NOT NULL ENABLE, 
	 PRIMARY KEY ("SESSION_KEY")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS"  ENABLE
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" 
 LOB ("SESSION_DATA") STORE AS BASICFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192
  NOCACHE LOGGING 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)) ;
 

  CREATE TABLE "BONSAILIMS"."DJANGO_CONTENT_TYPE" 
   (	"ID" NUMBER(11,0) NOT NULL ENABLE, 
	"NAME" NVARCHAR2(100), 
	"APP_LABEL" NVARCHAR2(100), 
	"MODEL" NVARCHAR2(100), 
	 PRIMARY KEY ("ID")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS"  ENABLE, 
	 UNIQUE ("APP_LABEL", "MODEL")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS"  ENABLE
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 

  CREATE UNIQUE INDEX "BONSAILIMS"."SYS_C0031235" ON "BONSAILIMS"."DJANGO_CONTENT_TYPE" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 
  CREATE UNIQUE INDEX "BONSAILIMS"."SYS_C0031236" ON "BONSAILIMS"."DJANGO_CONTENT_TYPE" ("APP_LABEL", "MODEL") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 

  CREATE OR REPLACE TRIGGER "BONSAILIMS"."DJANGO_CONTENT_TYPE_TR" 
BEFORE INSERT ON "DJANGO_CONTENT_TYPE"
FOR EACH ROW
 WHEN (new."ID" IS NULL) BEGIN
        SELECT "DJANGO_CONTENT_TYPE_SQ".nextval
        INTO :new."ID" FROM dual;
    END;

/
ALTER TRIGGER "BONSAILIMS"."DJANGO_CONTENT_TYPE_TR" ENABLE;
 

  CREATE TABLE "BONSAILIMS"."DJANGO_ADMIN_LOG" 
   (	"ID" NUMBER(11,0) NOT NULL ENABLE, 
	"ACTION_TIME" TIMESTAMP (6) NOT NULL ENABLE, 
	"USER_ID" NUMBER(11,0) NOT NULL ENABLE, 
	"CONTENT_TYPE_ID" NUMBER(11,0), 
	"OBJECT_ID" NCLOB, 
	"OBJECT_REPR" NVARCHAR2(200), 
	"ACTION_FLAG" NUMBER(11,0) NOT NULL ENABLE, 
	"CHANGE_MESSAGE" NCLOB, 
	 CHECK ("ACTION_FLAG" >= 0) ENABLE, 
	 PRIMARY KEY ("ID")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS"  ENABLE, 
	 FOREIGN KEY ("USER_ID")
	  REFERENCES "BONSAILIMS"."AUTH_USER" ("ID") DEFERRABLE INITIALLY DEFERRED ENABLE, 
	 FOREIGN KEY ("CONTENT_TYPE_ID")
	  REFERENCES "BONSAILIMS"."DJANGO_CONTENT_TYPE" ("ID") DEFERRABLE INITIALLY DEFERRED ENABLE
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" 
 LOB ("OBJECT_ID") STORE AS BASICFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192
  NOCACHE LOGGING 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)) 
 LOB ("CHANGE_MESSAGE") STORE AS BASICFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192
  NOCACHE LOGGING 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)) ;
 

  CREATE INDEX "BONSAILIMS"."DJANGO_ADMIN_LOG_CONTENT_T6E98" ON "BONSAILIMS"."DJANGO_ADMIN_LOG" ("CONTENT_TYPE_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 
  CREATE INDEX "BONSAILIMS"."DJANGO_ADMIN_LOG_USER_ID" ON "BONSAILIMS"."DJANGO_ADMIN_LOG" ("USER_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 
  CREATE UNIQUE INDEX "BONSAILIMS"."SYS_C0031426" ON "BONSAILIMS"."DJANGO_ADMIN_LOG" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" ;
 
  CREATE UNIQUE INDEX "BONSAILIMS"."SYS_IL0000111640C00005$$" ON "BONSAILIMS"."DJANGO_ADMIN_LOG" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
 
  CREATE UNIQUE INDEX "BONSAILIMS"."SYS_IL0000111640C00008$$" ON "BONSAILIMS"."DJANGO_ADMIN_LOG" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
 

  CREATE OR REPLACE TRIGGER "BONSAILIMS"."DJANGO_ADMIN_LOG_TR" 
BEFORE INSERT ON "DJANGO_ADMIN_LOG"
FOR EACH ROW
 WHEN (new."ID" IS NULL) BEGIN
        SELECT "DJANGO_ADMIN_LOG_SQ".nextval
        INTO :new."ID" FROM dual;
    END;

/
ALTER TRIGGER "BONSAILIMS"."DJANGO_ADMIN_LOG_TR" ENABLE;
 
