From f22d6ed6890747499603861f68e31feb6f9d38c7 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Sun, 5 Aug 2018 08:29:56 +0200 Subject: [PATCH] Add SeedDMS attribute customization, closes #270 --- seeddms.sh | 1 + seeddms/custom.sql | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 seeddms/custom.sql diff --git a/seeddms.sh b/seeddms.sh index df2a0d5..c6525d7 100755 --- a/seeddms.sh +++ b/seeddms.sh @@ -17,6 +17,7 @@ rc-update -u export SEEDDMS_PWD=$(head -c 18 /dev/urandom | base64) envsubst <${SOURCE_DIR}/createdb.sql | docker exec -i postgres psql docker run --rm seeddms cat /srv/seeddms/create_tables-postgres.sql | docker exec -i -e PGPASSWORD=${SEEDDMS_PWD} postgres psql seeddms seeddms +cat ${SOURCE_DIR}/custom.sql | docker exec -i -e PGPASSWORD=${SEEDDMS_PWD} postgres psql seeddms seeddms # Copy existing files into persistent storage mkdir -p /srv/seeddms/conf /srv/seeddms/data diff --git a/seeddms/custom.sql b/seeddms/custom.sql new file mode 100644 index 0000000..1ac5995 --- /dev/null +++ b/seeddms/custom.sql @@ -0,0 +1,13 @@ +INSERT INTO "tblAttributeDefinitions" (name, objtype, type) VALUES +('Licence', 2, 3), +('Autor', 2, 3), +('Source URL', 2, 5), +('Email', 2, 6), +('Organization', 2, 3), +('ISBN', 2, 3), +('Published', 2, 7), +('Language', 0, 3), +('Phone', 2, 1), +('Region', 0, 3), +('Org. abbreviation', 2, 3), +('ISSN', 2, 3);