From f0db4850c2ae845517157cad0a4963774032cee7 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 9 May 2023 11:30:04 +0530 Subject: [PATCH] fix: include `-` in datatype value Signed-off-by: Pranav C --- packages/nocodb/src/db/sql-client/lib/KnexClient.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nocodb/src/db/sql-client/lib/KnexClient.ts b/packages/nocodb/src/db/sql-client/lib/KnexClient.ts index e701b15288..468b882aa5 100644 --- a/packages/nocodb/src/db/sql-client/lib/KnexClient.ts +++ b/packages/nocodb/src/db/sql-client/lib/KnexClient.ts @@ -2970,7 +2970,7 @@ class KnexClient extends SqlClient { sanitiseDataType(dt: string) { // allow only alphanumeric and space // eg: varchar, int, bigint, text, character varying, etc - if (/^[\w ]+$/.test(dt)) return dt; + if (/^[\w -]+$/.test(dt)) return dt; throw new Error(`Invalid data type: ${dt}`); }