@budibase/server 2.6.19-alpha.2 → 2.6.19-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/server",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "2.6.19-alpha.
|
|
4
|
+
"version": "2.6.19-alpha.3",
|
|
5
5
|
"description": "Budibase Web Server",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"license": "GPL-3.0",
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@apidevtools/swagger-parser": "10.0.3",
|
|
48
|
-
"@budibase/backend-core": "2.6.19-alpha.
|
|
49
|
-
"@budibase/client": "2.6.19-alpha.
|
|
50
|
-
"@budibase/pro": "2.6.19-alpha.
|
|
51
|
-
"@budibase/shared-core": "2.6.19-alpha.
|
|
52
|
-
"@budibase/string-templates": "2.6.19-alpha.
|
|
53
|
-
"@budibase/types": "2.6.19-alpha.
|
|
48
|
+
"@budibase/backend-core": "2.6.19-alpha.3",
|
|
49
|
+
"@budibase/client": "2.6.19-alpha.3",
|
|
50
|
+
"@budibase/pro": "2.6.19-alpha.3",
|
|
51
|
+
"@budibase/shared-core": "2.6.19-alpha.3",
|
|
52
|
+
"@budibase/string-templates": "2.6.19-alpha.3",
|
|
53
|
+
"@budibase/types": "2.6.19-alpha.3",
|
|
54
54
|
"@bull-board/api": "3.7.0",
|
|
55
55
|
"@bull-board/koa": "3.9.4",
|
|
56
56
|
"@elastic/elasticsearch": "7.10.0",
|
|
@@ -177,5 +177,5 @@
|
|
|
177
177
|
"optionalDependencies": {
|
|
178
178
|
"oracledb": "5.3.0"
|
|
179
179
|
},
|
|
180
|
-
"gitHead": "
|
|
180
|
+
"gitHead": "9a3ddfba7931018031a3160c4972119a8bf4a0ac"
|
|
181
181
|
}
|
|
@@ -126,14 +126,15 @@ class PostgresIntegration extends Sql implements DatasourcePlus {
|
|
|
126
126
|
|
|
127
127
|
COLUMNS_SQL!: string
|
|
128
128
|
|
|
129
|
-
PRIMARY_KEYS_SQL = `
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
129
|
+
PRIMARY_KEYS_SQL = () => `
|
|
130
|
+
SELECT pg_namespace.nspname table_schema
|
|
131
|
+
, pg_class.relname table_name
|
|
132
|
+
, pg_attribute.attname primary_key
|
|
133
|
+
FROM pg_class
|
|
134
|
+
JOIN pg_index ON pg_class.oid = pg_index.indrelid AND pg_index.indisprimary
|
|
135
|
+
JOIN pg_attribute ON pg_attribute.attrelid = pg_class.oid AND pg_attribute.attnum = ANY(pg_index.indkey)
|
|
136
|
+
JOIN pg_namespace ON pg_namespace.oid = pg_class.relnamespace
|
|
137
|
+
WHERE pg_namespace.nspname = '${this.config.schema}';
|
|
137
138
|
`
|
|
138
139
|
|
|
139
140
|
constructor(config: PostgresConfig) {
|
|
@@ -239,7 +240,9 @@ class PostgresIntegration extends Sql implements DatasourcePlus {
|
|
|
239
240
|
let tableKeys: { [key: string]: string[] } = {}
|
|
240
241
|
await this.openConnection()
|
|
241
242
|
try {
|
|
242
|
-
const primaryKeysResponse = await this.client.query(
|
|
243
|
+
const primaryKeysResponse = await this.client.query(
|
|
244
|
+
this.PRIMARY_KEYS_SQL()
|
|
245
|
+
)
|
|
243
246
|
for (let table of primaryKeysResponse.rows) {
|
|
244
247
|
const tableName = table.table_name
|
|
245
248
|
if (!tableKeys[tableName]) {
|