summaryrefslogtreecommitdiffstats
path: root/cps-ri/src/main/resources
diff options
context:
space:
mode:
authorRuslan Kashapov <ruslan.kashapov@pantheon.tech>2020-11-24 11:13:43 +0200
committerRuslan Kashapov <ruslan.kashapov@pantheon.tech>2020-12-17 14:40:53 +0200
commit8a1e3c9f90d2111835460fc042b4a63f93b80384 (patch)
treec26fa83be590816686d239580e161cc04e298197 /cps-ri/src/main/resources
parent84ac94d2f3f9ebd6a3a7befa244beef851eac126 (diff)
Associate anchor to schema set
- db schema updated - db layer tests provided for ancor create and reading by dataspace - anchor model is removed from rest api as extra - api/spi updated to use string references instead of object Issue-ID: CPS-99 Change-Id: Ideeb83fa9e91ec1816308d8327a6589b999c64c5 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Diffstat (limited to 'cps-ri/src/main/resources')
-rwxr-xr-xcps-ri/src/main/resources/schema.sql4
1 files changed, 2 insertions, 2 deletions
diff --git a/cps-ri/src/main/resources/schema.sql b/cps-ri/src/main/resources/schema.sql
index 2dce470ae1..58b3c63c82 100755
--- a/cps-ri/src/main/resources/schema.sql
+++ b/cps-ri/src/main/resources/schema.sql
@@ -61,7 +61,7 @@ CREATE TABLE IF NOT EXISTS FRAGMENT
ANCHOR_NAME TEXT,
ANCHOR_ID BIGINT REFERENCES FRAGMENT(ID),
PARENT_ID BIGINT REFERENCES FRAGMENT(ID),
- MODULE_ID INTEGER REFERENCES MODULE(ID),
+ SCHEMA_SET_ID INTEGER REFERENCES SCHEMA_SET(ID),
DATASPACE_ID INTEGER NOT NULL REFERENCES DATASPACE(ID),
SCHEMA_NODE_ID INTEGER REFERENCES SCHEMA_NODE(ID),
UNIQUE (DATASPACE_ID, ANCHOR_NAME, XPATH)
@@ -78,7 +78,7 @@ CREATE TABLE IF NOT EXISTS RELATION
);
CREATE INDEX IF NOT EXISTS "FKI_FRAGMENT_DATASPACE_ID_FK" ON FRAGMENT USING BTREE(DATASPACE_ID) ;
-CREATE INDEX IF NOT EXISTS "FKI_FRAGMENT_MODULE_ID_FK" ON FRAGMENT USING BTREE(MODULE_ID) ;
+CREATE INDEX IF NOT EXISTS "FKI_FRAGMENT_SCHEMA_SET_ID_FK" ON FRAGMENT USING BTREE(SCHEMA_SET_ID) ;
CREATE INDEX IF NOT EXISTS "FKI_FRAGMENT_PARENT_ID_FK" ON FRAGMENT USING BTREE(PARENT_ID) ;
CREATE INDEX IF NOT EXISTS "FKI_FRAGMENT_ANCHOR_ID_FK" ON FRAGMENT USING BTREE(ANCHOR_ID) ;
CREATE INDEX IF NOT EXISTS "PERF_SCHEMA_NODE_SCHEMA_NODE_ID" ON SCHEMA_NODE USING BTREE(SCHEMA_NODE_IDENTIFIER) ;