From 7f49f87f276c878f486766144c38a6f6fd08a2e9 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Mon, 5 Aug 2024 16:15:15 +0100 Subject: [PATCH 1/4] Oracle fix PR comments. --- packages/backend-core/src/sql/sql.ts | 2 ++ packages/server/src/api/routes/tests/search.spec.ts | 3 --- packages/server/src/integrations/oracle.ts | 7 +++++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/backend-core/src/sql/sql.ts b/packages/backend-core/src/sql/sql.ts index bafaef40e4..8ab8fea20e 100644 --- a/packages/backend-core/src/sql/sql.ts +++ b/packages/backend-core/src/sql/sql.ts @@ -682,6 +682,8 @@ class InternalBuilder { const direction = value.direction === SortOrder.ASCENDING ? "asc" : "desc" + // TODO: figure out a way to remove this conditional, not relying on + // the defaults of each datastore. let nulls: "first" | "last" | undefined = undefined if ( this.client === SqlClient.POSTGRES || diff --git a/packages/server/src/api/routes/tests/search.spec.ts b/packages/server/src/api/routes/tests/search.spec.ts index 7d7fa7b1e0..8a1669d34c 100644 --- a/packages/server/src/api/routes/tests/search.spec.ts +++ b/packages/server/src/api/routes/tests/search.spec.ts @@ -1596,9 +1596,6 @@ describe.each([ // Our bigints are int64s in most datasources. let BIG = "9223372036854775807" - if (name === DatabaseName.ORACLE) { - // BIG = "9223372036854775808" - } beforeAll(async () => { table = await createTable({ diff --git a/packages/server/src/integrations/oracle.ts b/packages/server/src/integrations/oracle.ts index d1c0978b89..95e4943c7a 100644 --- a/packages/server/src/integrations/oracle.ts +++ b/packages/server/src/integrations/oracle.ts @@ -500,6 +500,13 @@ class OracleIntegration extends Sql implements DatasourcePlus { password: this.config.password, connectString, } + + // We set the timezone of the connection to match the timezone of the + // Budibase server, this is because several column types (e.g. time-only + // timestamps) do not store timezone information, so to avoid storing one + // time and getting a different one back we need to make sure the timezone + // of the server matches the timezone of the database. There's an assumption + // here that the server is running in the same timezone as the database. const tz = Intl.DateTimeFormat().resolvedOptions().timeZone const connection = await oracledb.getConnection(attributes) await connection.execute(`ALTER SESSION SET TIME_ZONE = '${tz}'`) From d03915d194861269d74d64e863c401e19912d688 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 7 Aug 2024 16:22:34 +0000 Subject: [PATCH 2/4] Bump version to 2.30.0 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 1b6574c7df..035e98d606 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "version": "2.29.30", + "version": "2.30.0", "npmClient": "yarn", "packages": [ "packages/*", From 4c189e1e96d5819418a55b6ba4405a737e3e5072 Mon Sep 17 00:00:00 2001 From: melohagan <101575380+melohagan@users.noreply.github.com> Date: Thu, 8 Aug 2024 09:48:17 +0100 Subject: [PATCH 3/4] Add BpmStatusValue failed (#14334) --- packages/shared-core/src/constants/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/shared-core/src/constants/index.ts b/packages/shared-core/src/constants/index.ts index 0713b5d2f8..78984aafa4 100644 --- a/packages/shared-core/src/constants/index.ts +++ b/packages/shared-core/src/constants/index.ts @@ -182,6 +182,7 @@ export enum BpmStatusValue { COMPLETING_ACCOUNT_INFO = "completing_account_info", VERIFYING_EMAIL = "verifying_email", COMPLETED = "completed", + FAILED = "failed", } export const DEFAULT_BB_DATASOURCE_ID = "datasource_internal_bb_default" From 9c6b8cdd0e011c7d397be48cd5dfb804c1c63674 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Thu, 8 Aug 2024 09:01:28 +0000 Subject: [PATCH 4/4] Bump version to 2.30.1 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 035e98d606..caa665a0f2 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "version": "2.30.0", + "version": "2.30.1", "npmClient": "yarn", "packages": [ "packages/*",