Browse Source

fix: include `-` in datatype value

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5613/head
Pranav C 2 years ago
parent
commit
f0db4850c2
  1. 2
      packages/nocodb/src/db/sql-client/lib/KnexClient.ts

2
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}`);
}

Loading…
Cancel
Save