Browse Source

test: fix handling of datatype with length info

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/3422/head
Raju Udava 2 years ago
parent
commit
eccb6d0aca
  1. 3
      packages/nocodb/src/lib/db/sql-mgr/code/models/xc/ModelXcMetaSqlite.ts

3
packages/nocodb/src/lib/db/sql-mgr/code/models/xc/ModelXcMetaSqlite.ts

@ -559,7 +559,8 @@ class ModelXcMetaSqlite extends BaseModelXcMeta {
}
private getAbstractType(col): any {
switch ((col.dt || col.dt).toLowerCase()) {
// remove length value from datatype (for ex. varchar(45) => varchar)
switch (col.dt?.replace(/\(\d+\)$/, '').toLowerCase()) {
case 'date':
return 'date';
case 'datetime':

Loading…
Cancel
Save