diff --git a/server/bundles/io.cloudbeaver.server/schema/schema.graphqls b/server/bundles/io.cloudbeaver.server/schema/schema.graphqls index 6f8f155a82..191dc13f01 100644 --- a/server/bundles/io.cloudbeaver.server/schema/schema.graphqls +++ b/server/bundles/io.cloudbeaver.server/schema/schema.graphqls @@ -2,6 +2,7 @@ scalar Object # Date/Time scalar DateTime +scalar Date input PageInput { limit: Int diff --git a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/graphql/GraphQLBindingContext.java b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/graphql/GraphQLBindingContext.java index 70fb9f0fc3..b0e2485d40 100644 --- a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/graphql/GraphQLBindingContext.java +++ b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/graphql/GraphQLBindingContext.java @@ -41,6 +41,7 @@ RuntimeWiring buildRuntimeWiring() { runtimeWiring = RuntimeWiring.newRuntimeWiring(); runtimeWiring .scalar(ExtendedScalars.DateTime) + .scalar(ExtendedScalars.Date) .scalar(ExtendedScalars.Object); queryType = TypeRuntimeWiring.newTypeWiring("Query"); mutationType = TypeRuntimeWiring.newTypeWiring("Mutation"); 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 258344c15e..1c91b24224 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 @@ -293,5 +293,6 @@ CREATE TABLE {table_prefix}CB_ACCESS_TOKEN EXPIRATION_TIME TIMESTAMP NULL, PRIMARY KEY (USER_ID, TOKEN_ID), + UNIQUE (USER_ID, TOKEN_NAME), FOREIGN KEY (USER_ID) REFERENCES {table_prefix}CB_USER(USER_ID) ON DELETE CASCADE ); diff --git a/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_22.sql b/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_22.sql index 08536c2a7c..201502ce6c 100644 --- a/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_22.sql +++ b/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_22.sql @@ -7,5 +7,6 @@ CREATE TABLE {table_prefix}CB_ACCESS_TOKEN EXPIRATION_TIME TIMESTAMP NULL, PRIMARY KEY (USER_ID, TOKEN_ID), + UNIQUE (USER_ID, TOKEN_NAME), FOREIGN KEY (USER_ID) REFERENCES {table_prefix}CB_USER(USER_ID) ON DELETE CASCADE - ); +);