diff --git a/server/bundles/io.cloudbeaver.service.security/db/cb_schema_create.sql b/server/bundles/io.cloudbeaver.service.security/db/cb_schema_create.sql index 3e290e80ea..8186f838a5 100644 --- a/server/bundles/io.cloudbeaver.service.security/db/cb_schema_create.sql +++ b/server/bundles/io.cloudbeaver.service.security/db/cb_schema_create.sql @@ -273,3 +273,13 @@ CREATE TABLE {table_prefix}CB_SUBJECT_SECRETS CREATE INDEX IDX_SUBJECT_SECRETS_PROJECT ON {table_prefix}CB_SUBJECT_SECRETS (PROJECT_ID,SUBJECT_ID); CREATE INDEX IDX_SUBJECT_SECRETS_OBJECT ON {table_prefix}CB_SUBJECT_SECRETS (PROJECT_ID,OBJECT_TYPE,OBJECT_ID); + +-- Tasks +CREATE TABLE {table_prefix}CB_TASKS +( + TASK_ID VARCHAR(128) NOT NULL, + CREATE_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, + TIMEOUT INTEGER NOT NULL, + + PRIMARY KEY (TASK_ID) +); diff --git a/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_21.sql b/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_21.sql new file mode 100644 index 0000000000..fd7739c5b1 --- /dev/null +++ b/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_21.sql @@ -0,0 +1,8 @@ +CREATE TABLE {table_prefix}CB_TASKS +( + TASK_ID VARCHAR(128) NOT NULL, + CREATE_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, + TIMEOUT INTEGER NOT NULL, + + PRIMARY KEY (TASK_ID) +); \ No newline at end of file diff --git a/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/db/CBDatabase.java b/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/db/CBDatabase.java index 95268033c8..609d1fe54e 100644 --- a/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/db/CBDatabase.java +++ b/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/db/CBDatabase.java @@ -74,7 +74,7 @@ public class CBDatabase { public static final String SCHEMA_UPDATE_SQL_PATH = "db/cb_schema_update_"; private static final int LEGACY_SCHEMA_VERSION = 1; - private static final int CURRENT_SCHEMA_VERSION = 20; + private static final int CURRENT_SCHEMA_VERSION = 21; private static final String DEFAULT_DB_USER_NAME = "cb-data"; private static final String DEFAULT_DB_PWD_FILE = ".database-credentials.dat";