π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
fix: fix unique constraint extraction
Pranav C3e558a0cbdac
diff --git a/packages/nocodb/src/db/sql-client/lib/pg/PgClient.ts b/packages/nocodb/src/db/sql-client/lib/pg/PgClient.tsindex 3c7ee8fb6e..9d9a04980f 100644--- a/packages/nocodb/src/db/sql-client/lib/pg/PgClient.ts+++ b/packages/nocodb/src/db/sql-client/lib/pg/PgClient.ts@@ -848,7 +848,7 @@ class PGClient extends KnexClient {tc1.CONSTRAINT_TYPE = 'UNIQUE'and tc1.TABLE_NAME = c.TABLE_NAMEand cu.COLUMN_NAME = c.COLUMN_NAME- and tc1.TABLE_SCHEMA=c.TABLE_SCHEMA) IsUnique,+ and tc1.TABLE_SCHEMA=c.TABLE_SCHEMA) is_unique,(SELECTstring_agg(enumlabel, ',')FROM "pg_enum" "e"@@ -893,6 +893,7 @@ class PGClient extends KnexClient {column.clen = response.rows[i].clen;column.dp = response.rows[i].dp;column.cop = response.rows[i].cop;+ column.unique = response.rows[i].is_unique;// todo : there are lot of types in pg - handle them//column.dtx = this.getKnexDataType(column.dt);