From 8cb2e9bfa3ecbb40d0e63aefa89cd1027dbf00dc Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 24 Jan 2024 11:58:10 +0100 Subject: [PATCH] add changes to database for link types --- install/update-6.1.0/update-postgres.sql | 8 ++++++++ install/update-6.1.0/update-sqlite3.sql | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/install/update-6.1.0/update-postgres.sql b/install/update-6.1.0/update-postgres.sql index f5c6168fb..8b3e8aff4 100644 --- a/install/update-6.1.0/update-postgres.sql +++ b/install/update-6.1.0/update-postgres.sql @@ -56,6 +56,14 @@ CREATE TABLE "tblUserAttributes" ( UNIQUE (userID, attrdef) ) ; +CREATE TABLE "tblLinkType" ( + "id" SERIAL UNIQUE, + "name" text NOT NULL, + "color" char(8) DEFAULT NULL +); + +ALTER TABLE "tblDocumentLinks" ADD COLUMN "linktype" INTEGER DEFAULT NULL REFERENCES tblLinkType("id") ON DELETE CASCADE; + UPDATE "tblVersion" set "major"=6, "minor"=1, "subminor"=0, "module"='core'; COMMIT; diff --git a/install/update-6.1.0/update-sqlite3.sql b/install/update-6.1.0/update-sqlite3.sql index 981913d1f..960b7fdc6 100644 --- a/install/update-6.1.0/update-sqlite3.sql +++ b/install/update-6.1.0/update-sqlite3.sql @@ -102,6 +102,14 @@ CREATE TABLE `tblUserAttributes` ( UNIQUE (`userID`, `attrdef`) ); +CREATE TABLE `tblLinkType` ( + `id` INTEGER PRIMARY KEY AUTOINCREMENT, + `name` text NOT NULL, + `color` char(8) DEFAULT NULL +); + +ALTER TABLE `tblDocumentLinks` ADD COLUMN `linktype` INTEGER DEFAULT NULL REFERENCES tblLinkType(`id`) ON DELETE CASCADE; + UPDATE `tblVersion` set `major`=6, `minor`=1, `subminor`=0, `module`='core'; COMMIT;