text: 
    CREATE TABLE "OFFENDER_VISIT_ORDERS"
     (    "OFFENDER_VISIT_ORDER_ID" NUMBER(10,0) NOT NULL,
      "VISIT_ORDER_NUMBER" NUMBER(13,0) NOT NULL,
      "OFFENDER_BOOK_ID" NUMBER(10,0) NOT NULL,
      "COMMENT_TEXT" VARCHAR2(240 CHAR),
      "ISSUE_DATE" DATE NOT NULL,
      "VISIT_ORDER_TYPE" VARCHAR2(6 CHAR) NOT NULL,
      "STATUS" VARCHAR2(12 CHAR) NOT NULL,
      "EXPIRY_DATE" DATE,
      "OUTCOME_REASON_CODE" VARCHAR2(12 CHAR),
      "MAILED_DATE" DATE,
      "AUTHORISED_STAFF_ID" NUMBER(10,0),
      "CREATE_DATETIME" TIMESTAMP (9) DEFAULT systimestamp NOT NULL,
      "CREATE_USER_ID" VARCHAR2(32 CHAR) DEFAULT USER NOT NULL,
      "MODIFY_DATETIME" TIMESTAMP (9),
      "MODIFY_USER_ID" VARCHAR2(32 CHAR),
      "AUDIT_TIMESTAMP" TIMESTAMP (9),
      "AUDIT_USER_ID" VARCHAR2(32 CHAR),
      "AUDIT_MODULE_NAME" VARCHAR2(65 CHAR),
      "AUDIT_CLIENT_USER_ID" VARCHAR2(64 CHAR),
      "AUDIT_CLIENT_IP_ADDRESS" VARCHAR2(39 CHAR),
      "AUDIT_CLIENT_WORKSTATION_NAME" VARCHAR2(64 CHAR),
      "AUDIT_ADDITIONAL_INFO" VARCHAR2(256 CHAR),
       CONSTRAINT "OFFENDER_VISIT_ORDERS_PK" PRIMARY KEY ("OFFENDER_VISIT_ORDER_ID"),
       CONSTRAINT "OFF_VIS_ORD_OFF_BKG_FK" FOREIGN KEY ("OFFENDER_BOOK_ID")
        REFERENCES "OFFENDER_BOOKINGS" ("OFFENDER_BOOK_ID")
    );
  
    CREATE INDEX "OFFENDER_VISIT_ORDERS_NI1" ON "OFFENDER_VISIT_ORDERS" ("OFFENDER_BOOK_ID");
  
  
    CREATE INDEX "OFFENDER_VISIT_ORDERS_NI2" ON "OFFENDER_VISIT_ORDERS" ("VISIT_ORDER_NUMBER");
  
  
    CREATE INDEX "OFFENDER_VISIT_ORDERS_NI3" ON "OFFENDER_VISIT_ORDERS" ("ISSUE_DATE");
  
  
    CREATE UNIQUE INDEX "OFFENDER_VISIT_ORDERS_PK" ON "OFFENDER_VISIT_ORDERS" ("OFFENDER_VISIT_ORDER_ID");
  