-- this script updates the TASKANA database schema from version 6.2.0 to version 7.0.0.

INSERT INTO TASKANA_SCHEMA_VERSION (ID, VERSION, CREATED)
VALUES (nextval('TASKANA_SCHEMA_VERSION_ID_SEQ'), '7.0.0', CURRENT_TIMESTAMP);

CREATE TABLE PERMISSION_INFO
(
    USER_ID     VARCHAR(32) NOT NULL,
    PERMISSION_ID    VARCHAR(256) NOT NULL,
    PRIMARY KEY (USER_ID, PERMISSION_ID)
);

ALTER TABLE WORKBASKET
  ADD (
  `CUSTOM_5` VARCHAR(255) NULL,
  `CUSTOM_6` VARCHAR(255) NULL,
  `CUSTOM_7` VARCHAR(255) NULL,
  `CUSTOM_8` VARCHAR(255) NULL
  ) AFTER `MARKED_FOR_DELETION`;
