Browse Source

fix: regex to get default value

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/6965/head
mertmit 1 year ago
parent
commit
56947e83af
  1. 2
      packages/nocodb/src/db/sql-client/lib/pg/PgClient.ts

2
packages/nocodb/src/db/sql-client/lib/pg/PgClient.ts

@ -891,7 +891,7 @@ class PGClient extends KnexClient {
// column['unique'] = response.rows[i]['cst'].indexOf('UNIQUE') === -1 ? false : true;
column.cdf = response.rows[i].cdf
? response.rows[i].cdf.replace(/::\w+$/, '').replace(/^'|'$/g, '')
? response.rows[i].cdf.replace(/::[\w ]+$/, '').replace(/^'|'$/g, '')
: response.rows[i].cdf;
// todo : need to find column comment

Loading…
Cancel
Save