Skip to content

Commit

Permalink
sql
Browse files Browse the repository at this point in the history
  • Loading branch information
roland-sipos committed Oct 29, 2021
1 parent 6395b2c commit cd07dab
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 26 deletions.
26 changes: 0 additions & 26 deletions runregistry-rest/runregistry_table.sql

This file was deleted.

19 changes: 19 additions & 0 deletions runregistry-rest/sql/runreg-blob.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--------------------------------------------------------
-- File created - Friday-October-29-2021
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table RUN_REGISTRY_CONFIGS
--------------------------------------------------------

CREATE TABLE "RUN_REGISTRY_CONFIGS" ("RUN_NUMBER" NUMBER, "CONFIGURATION" BLOB) LOB ("CONFIGURATION") STORE AS SECUREFILE "SYS_LOB0436808964C00002$$"(ENABLE STORAGE IN ROW CHUNK 8192 NOCACHE LOGGING NOCOMPRESS KEEP_DUPLICATES )
--------------------------------------------------------
-- Constraints for Table RUN_REGISTRY_CONFIGS
--------------------------------------------------------

ALTER TABLE "RUN_REGISTRY_CONFIGS" MODIFY ("RUN_NUMBER" NOT NULL ENABLE)
ALTER TABLE "RUN_REGISTRY_CONFIGS" MODIFY ("CONFIGURATION" NOT NULL ENABLE)
--------------------------------------------------------
-- Ref Constraints for Table RUN_REGISTRY_CONFIGS
--------------------------------------------------------

ALTER TABLE "RUN_REGISTRY_CONFIGS" ADD CONSTRAINT "RUN_REGISTRY_CONFIGS_FK1" FOREIGN KEY ("RUN_NUMBER") REFERENCES "RUN_REGISTRY_META" ("RUN_NUMBER") ENABLE
24 changes: 24 additions & 0 deletions runregistry-rest/sql/runreg-meta.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
--------------------------------------------------------
-- File created - Friday-October-29-2021
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table RUN_REGISTRY_META
--------------------------------------------------------

CREATE TABLE "RUN_REGISTRY_META" ("RUN_NUMBER" NUMBER, "START_TIME" TIMESTAMP (6), "STOP_TIME" TIMESTAMP (6), "DETECTOR_ID" VARCHAR2(40), "RUN_TYPE" VARCHAR2(40), "FILENAME" VARCHAR2(100), "SOFTWARE_VERSION" VARCHAR2(40))
--------------------------------------------------------
-- DDL for Index RUN_REGISTRY_META_PK
--------------------------------------------------------

CREATE UNIQUE INDEX "RUN_REGISTRY_META_PK" ON "RUN_REGISTRY_META" ("RUN_NUMBER")
--------------------------------------------------------
-- Constraints for Table RUN_REGISTRY_META
--------------------------------------------------------

ALTER TABLE "RUN_REGISTRY_META" ADD CONSTRAINT "RUN_REGISTRY_META_PK" PRIMARY KEY ("RUN_NUMBER") USING INDEX ENABLE
ALTER TABLE "RUN_REGISTRY_META" MODIFY ("RUN_NUMBER" NOT NULL ENABLE)
ALTER TABLE "RUN_REGISTRY_META" MODIFY ("START_TIME" NOT NULL ENABLE)
ALTER TABLE "RUN_REGISTRY_META" MODIFY ("DETECTOR_ID" NOT NULL ENABLE)
ALTER TABLE "RUN_REGISTRY_META" MODIFY ("RUN_TYPE" NOT NULL ENABLE)
ALTER TABLE "RUN_REGISTRY_META" MODIFY ("FILENAME" NOT NULL ENABLE)
ALTER TABLE "RUN_REGISTRY_META" MODIFY ("SOFTWARE_VERSION" NOT NULL ENABLE)

0 comments on commit cd07dab

Please sign in to comment.