CREATE TABLE "[MIESQUEMA]"."REST_USUARIOS" ( "USUARIO" VARCHAR2(30 BYTE) NOT NULL ENABLE, "PASSWORD" VARCHAR2(50 BYTE), "TIEMPO_VIDA_TOKEN" NUMBER DEFAULT 300000 NOT NULL ENABLE, CONSTRAINT "REST_USUARIOS_PK" PRIMARY KEY ("USUARIO") 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 "IND[MIESQUEMA]" ENABLE ) SEGMENT CREATION IMMEDIATE 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 "[MIESQUEMA]" ; COMMENT ON COLUMN "[MIESQUEMA]"."REST_USUARIOS"."TIEMPO_VIDA_TOKEN" IS 'Tiempo de vida del token antes de caducar.'; CREATE TABLE "[MIESQUEMA]"."REST_USUARIO_TOKEN" ( "ID" NUMBER NOT NULL ENABLE, "USUARIO" VARCHAR2(50 BYTE) NOT NULL ENABLE, "TOKEN" VARCHAR2(100 BYTE) NOT NULL ENABLE, "FECHA_CREACION" TIMESTAMP (6) NOT NULL ENABLE, CONSTRAINT "REST_USUARIO_TOKEN_PK" 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 FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "IND[MIESQUEMA]" ENABLE, CONSTRAINT "REST_USUARIO_TOKEN_FK1" FOREIGN KEY ("USUARIO") REFERENCES "[MIESQUEMA]"."REST_USUARIOS" ("USUARIO") ENABLE ) SEGMENT CREATION IMMEDIATE 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 "[MIESQUEMA]" ; GRANT SELECT, INSERT, UPDATE, DELETE ON "[MIESQUEMA]"."REST_USUARIOS" TO JV_[MIESQUEMA]; GRANT SELECT, INSERT, UPDATE, DELETE ON "[MIESQUEMA]"."REST_USUARIO_TOKEN" TO JV_[MIESQUEMA]; CREATE SEQUENCE "[MIESQUEMA]"."REST_TOKEN_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 ORDER NOCYCLE ; GRANT SELECT ON "[MIESQUEMA]"."REST_TOKEN_SEQ" TO JV_[MIESQUEMA];