-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #2336 - removed default for new columns in update scripts.
- Loading branch information
1 parent
4614082
commit 73940f8
Showing
4 changed files
with
54 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 15 additions & 8 deletions
23
...ana-common/src/main/resources/sql/oracle/taskana_schema_update_5.10.0_to_6.2.0_oracle.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
-- this script updates the TASKANA database schema from version 5.10.0 to version 6.2.0. | ||
ALTER SESSION SET CURRENT_SCHEMA = %schemaName%; | ||
ALTER | ||
SESSION SET CURRENT_SCHEMA = %schemaName%; | ||
|
||
INSERT INTO TASKANA_SCHEMA_VERSION (ID, VERSION, CREATED) | ||
VALUES (TASKANA_SCHEMA_VERSION_ID_SEQ.NEXTVAL, '6.2.0', CURRENT_TIMESTAMP); | ||
VALUES (TASKANA_SCHEMA_VERSION_ID_SEQ.NEXTVAL, '6.2.0', CURRENT_TIMESTAMP); | ||
|
||
ALTER TABLE WORKBASKET_ACCESS_LIST ADD PERM_READTASKS NUMBER(1) DEFAULT 0 NOT NULL CHECK (PERM_READTASKS IN (0,1)); | ||
ALTER TABLE WORKBASKET_ACCESS_LIST | ||
ADD PERM_READTASKS NUMBER(1) DEFAULT 0 NOT NULL CHECK (PERM_READTASKS IN (0,1)); | ||
UPDATE WORKBASKET_ACCESS_LIST | ||
SET PERM_READTASKS=PERM_READ; | ||
ALTER TABLE WORKBASKET_ACCESS_LIST | ||
ALTER PERM_READTASKS DROP DEFAULT; | ||
|
||
UPDATE WORKBASKET_ACCESS_LIST SET PERM_READTASKS=PERM_READ; | ||
|
||
ALTER TABLE WORKBASKET_ACCESS_LIST ADD PERM_EDITTASKS NUMBER(1) DEFAULT 0 NOT NULL CHECK (PERM_EDITTASKS IN (0,1)); | ||
|
||
UPDATE WORKBASKET_ACCESS_LIST SET PERM_EDITTASKS=PERM_READ; | ||
ALTER TABLE WORKBASKET_ACCESS_LIST | ||
ADD PERM_EDITTASKS NUMBER(1) DEFAULT 0 NOT NULL CHECK (PERM_EDITTASKS IN (0,1)); | ||
UPDATE WORKBASKET_ACCESS_LIST | ||
SET PERM_EDITTASKS=PERM_READ; | ||
ALTER TABLE WORKBASKET_ACCESS_LIST | ||
ALTER PERM_EDITTASKS DROP DEFAULT |
21 changes: 14 additions & 7 deletions
21
...common/src/main/resources/sql/postgres/taskana_schema_update_5.10.0_to_6.2.0_postgres.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
-- this script updates the TASKANA database schema from version 5.10.0 to version 6.2.0. | ||
SET search_path = %schemaName%; | ||
SET | ||
search_path = %schemaName%; | ||
|
||
INSERT INTO TASKANA_SCHEMA_VERSION (ID, VERSION, CREATED) | ||
VALUES (nextval('TASKANA_SCHEMA_VERSION_ID_SEQ'), '6.2.0', CURRENT_TIMESTAMP); | ||
|
||
ALTER TABLE WORKBASKET_ACCESS_LIST ADD COLUMN PERM_READTASKS BOOLEAN NOT NULL DEFAULT FALSE; | ||
ALTER TABLE WORKBASKET_ACCESS_LIST | ||
ADD COLUMN PERM_READTASKS BOOLEAN NOT NULL DEFAULT FALSE; | ||
UPDATE WORKBASKET_ACCESS_LIST | ||
SET PERM_READTASKS=PERM_READ; | ||
ALTER TABLE WORKBASKET_ACCESS_LIST | ||
ALTER COLUMN PERM_READTASKS DROP DEFAULT; | ||
|
||
UPDATE WORKBASKET_ACCESS_LIST SET PERM_READTASKS=PERM_READ; | ||
|
||
ALTER TABLE WORKBASKET_ACCESS_LIST ADD COLUMN PERM_EDITTASKS BOOLEAN NOT NULL DEFAULT FALSE; | ||
|
||
UPDATE WORKBASKET_ACCESS_LIST SET PERM_EDITTASKS=PERM_READ; | ||
ALTER TABLE WORKBASKET_ACCESS_LIST | ||
ADD COLUMN PERM_EDITTASKS BOOLEAN NOT NULL DEFAULT FALSE; | ||
UPDATE WORKBASKET_ACCESS_LIST | ||
SET PERM_EDITTASKS=PERM_READ; | ||
ALTER TABLE WORKBASKET_ACCESS_LIST | ||
ALTER COLUMN PERM_EDITTASKS DROP DEFAULT; |