Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add DMS for main layers #216

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions datamodel/changelogs/0100/0100_10_dms.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
CREATE TABLE signalo_db.dms_document(
id uuid DEFAULT uuid_generate_v1() NOT NULL,
identification text NOT NULL,
path text,
type text
);
ALTER TABLE ONLY signalo_db.dms_document ADD CONSTRAINT dms_document_pkey PRIMARY KEY (id);


CREATE TABLE signalo_db.dms_rel_document(
id uuid DEFAULT uuid_generate_v1() NOT NULL,
fk_document uuid,
object_class text,
fk_object uuid
);

ALTER TABLE ONLY signalo_db.dms_rel_document ADD CONSTRAINT dms_rel_document_pkey PRIMARY KEY (id);

ALTER TABLE ONLY signalo_db.dms_rel_document
ADD CONSTRAINT fk_document FOREIGN KEY (fk_document)
REFERENCES signalo_db.dms_document(id) MATCH FULL DEFERRABLE INITIALLY DEFERRED;
1 change: 1 addition & 0 deletions datamodel/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ psql "service=${PGSERVICE}" -v ON_ERROR_STOP=1 -v SRID=${SRID} -f ${DIR}/changel
psql "service=${PGSERVICE}" -v ON_ERROR_STOP=1 -v SRID=${SRID} -f ${DIR}/changelogs/0100/0100_07_missing_left_right.sql
psql "service=${PGSERVICE}" -v ON_ERROR_STOP=1 -v SRID=${SRID} -f ${DIR}/changelogs/0100/0100_08_477_signs.sql
psql "service=${PGSERVICE}" -v ON_ERROR_STOP=1 -v SRID=${SRID} -f ${DIR}/changelogs/0100/0100_09_exceptes.sql
psql "service=${PGSERVICE}" -v ON_ERROR_STOP=1 -v SRID=${SRID} -f ${DIR}/changelogs/0100/0100_10_dms.sql

if [[ $demo_data == True ]]; then
echo "*** inserting demo_data"
Expand Down
Loading