-- 04_sys_tables.sql
-- Create SYS custom tables and sequence
-- Source: backup/06_sys_tables.sql

CREATE TABLE "SYS"."AUTH_DETALII"
   (	"DETALII" VARCHAR2(15) NOT NULL ENABLE
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 16384 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "SYSTEM";
/

CREATE TABLE "SYS"."AUTH_SERII"
   (	"ID_SERIE" NUMBER(5,0) NOT NULL ENABLE,
	"ID_PROGRAM" NUMBER(5,0) NOT NULL ENABLE,
	"SERIE" RAW(128) NOT NULL ENABLE,
	"STERS" NUMBER(1,0) DEFAULT 0 NOT NULL ENABLE,
	"DATAORA" DATE DEFAULT sysdate NOT NULL ENABLE,
	"ID_UTIL" NUMBER(5,0) NOT NULL ENABLE,
	"DATAORAS" DATE,
	"ID_UTILS" NUMBER(5,0),
	 CONSTRAINT "PK_AUTH_SERII" PRIMARY KEY ("ID_SERIE")
  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 FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "SYSTEM"  ENABLE
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 16384 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "SYSTEM";
/

CREATE TABLE "SYS"."INFO"
   (	"INFO" CLOB,
	"DATAORA" TIMESTAMP (6) DEFAULT SYSTIMESTAMP,
	"LOCATIA" VARCHAR2(200)
   ) 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 FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "SYSTEM"
 LOB ("INFO") STORE AS BASICFILE (
  TABLESPACE "SYSTEM" ENABLE STORAGE IN ROW 4000 CHUNK 8192 RETENTION
  NOCACHE LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT));
/

CREATE SEQUENCE  "SYS"."SEQ_AUTH_SERII"  MINVALUE 1 MAXVALUE 99999999999999999 INCREMENT BY 1 START WITH 37 NOCACHE  NOORDER  NOCYCLE  NOKEEP  NOSCALE  GLOBAL;
/
