@pgpmjs/core 4.11.0 → 4.12.1
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.
|
@@ -47,6 +47,10 @@ const config = {
|
|
|
47
47
|
field: {
|
|
48
48
|
schema: 'metaschema_public',
|
|
49
49
|
table: 'field',
|
|
50
|
+
// Use ON CONFLICT DO NOTHING to handle the unique constraint (databases_field_uniq_names_idx)
|
|
51
|
+
// which normalizes UUID field names by stripping suffixes like _id, _uuid, etc.
|
|
52
|
+
// This causes collisions when tables have both 'foo' (text) and 'foo_id' (uuid) columns.
|
|
53
|
+
conflictDoNothing: true,
|
|
50
54
|
fields: {
|
|
51
55
|
id: 'uuid',
|
|
52
56
|
database_id: 'uuid',
|
|
@@ -227,6 +231,7 @@ const config = {
|
|
|
227
231
|
table: 'extension',
|
|
228
232
|
fields: {
|
|
229
233
|
id: 'uuid',
|
|
234
|
+
database_id: 'uuid',
|
|
230
235
|
name: 'text'
|
|
231
236
|
}
|
|
232
237
|
},
|
|
@@ -342,9 +347,9 @@ const config = {
|
|
|
342
347
|
schema_name: 'text'
|
|
343
348
|
}
|
|
344
349
|
},
|
|
345
|
-
|
|
350
|
+
api_schemas: {
|
|
346
351
|
schema: 'services_public',
|
|
347
|
-
table: '
|
|
352
|
+
table: 'api_schemas',
|
|
348
353
|
fields: {
|
|
349
354
|
id: 'uuid',
|
|
350
355
|
database_id: 'uuid',
|
|
@@ -819,7 +824,7 @@ export const exportMeta = async ({ opts, dbname, database_id }) => {
|
|
|
819
824
|
await queryAndParse('full_text_search', `SELECT * FROM metaschema_public.full_text_search WHERE database_id = $1`);
|
|
820
825
|
await queryAndParse('schema_grant', `SELECT * FROM metaschema_public.schema_grant WHERE database_id = $1`);
|
|
821
826
|
await queryAndParse('table_grant', `SELECT * FROM metaschema_public.table_grant WHERE database_id = $1`);
|
|
822
|
-
await queryAndParse('extension', `SELECT * FROM metaschema_public.extension`);
|
|
827
|
+
await queryAndParse('extension', `SELECT * FROM metaschema_public.extension WHERE database_id = $1`);
|
|
823
828
|
// =============================================================================
|
|
824
829
|
// services_public tables
|
|
825
830
|
// =============================================================================
|
|
@@ -832,7 +837,7 @@ export const exportMeta = async ({ opts, dbname, database_id }) => {
|
|
|
832
837
|
await queryAndParse('site_metadata', `SELECT * FROM services_public.site_metadata WHERE database_id = $1`);
|
|
833
838
|
await queryAndParse('api_modules', `SELECT * FROM services_public.api_modules WHERE database_id = $1`);
|
|
834
839
|
await queryAndParse('api_extensions', `SELECT * FROM services_public.api_extensions WHERE database_id = $1`);
|
|
835
|
-
await queryAndParse('
|
|
840
|
+
await queryAndParse('api_schemas', `SELECT * FROM services_public.api_schemas WHERE database_id = $1`);
|
|
836
841
|
// =============================================================================
|
|
837
842
|
// metaschema_modules_public tables
|
|
838
843
|
// =============================================================================
|
package/export/export-meta.js
CHANGED
|
@@ -50,6 +50,10 @@ const config = {
|
|
|
50
50
|
field: {
|
|
51
51
|
schema: 'metaschema_public',
|
|
52
52
|
table: 'field',
|
|
53
|
+
// Use ON CONFLICT DO NOTHING to handle the unique constraint (databases_field_uniq_names_idx)
|
|
54
|
+
// which normalizes UUID field names by stripping suffixes like _id, _uuid, etc.
|
|
55
|
+
// This causes collisions when tables have both 'foo' (text) and 'foo_id' (uuid) columns.
|
|
56
|
+
conflictDoNothing: true,
|
|
53
57
|
fields: {
|
|
54
58
|
id: 'uuid',
|
|
55
59
|
database_id: 'uuid',
|
|
@@ -230,6 +234,7 @@ const config = {
|
|
|
230
234
|
table: 'extension',
|
|
231
235
|
fields: {
|
|
232
236
|
id: 'uuid',
|
|
237
|
+
database_id: 'uuid',
|
|
233
238
|
name: 'text'
|
|
234
239
|
}
|
|
235
240
|
},
|
|
@@ -345,9 +350,9 @@ const config = {
|
|
|
345
350
|
schema_name: 'text'
|
|
346
351
|
}
|
|
347
352
|
},
|
|
348
|
-
|
|
353
|
+
api_schemas: {
|
|
349
354
|
schema: 'services_public',
|
|
350
|
-
table: '
|
|
355
|
+
table: 'api_schemas',
|
|
351
356
|
fields: {
|
|
352
357
|
id: 'uuid',
|
|
353
358
|
database_id: 'uuid',
|
|
@@ -822,7 +827,7 @@ const exportMeta = async ({ opts, dbname, database_id }) => {
|
|
|
822
827
|
await queryAndParse('full_text_search', `SELECT * FROM metaschema_public.full_text_search WHERE database_id = $1`);
|
|
823
828
|
await queryAndParse('schema_grant', `SELECT * FROM metaschema_public.schema_grant WHERE database_id = $1`);
|
|
824
829
|
await queryAndParse('table_grant', `SELECT * FROM metaschema_public.table_grant WHERE database_id = $1`);
|
|
825
|
-
await queryAndParse('extension', `SELECT * FROM metaschema_public.extension`);
|
|
830
|
+
await queryAndParse('extension', `SELECT * FROM metaschema_public.extension WHERE database_id = $1`);
|
|
826
831
|
// =============================================================================
|
|
827
832
|
// services_public tables
|
|
828
833
|
// =============================================================================
|
|
@@ -835,7 +840,7 @@ const exportMeta = async ({ opts, dbname, database_id }) => {
|
|
|
835
840
|
await queryAndParse('site_metadata', `SELECT * FROM services_public.site_metadata WHERE database_id = $1`);
|
|
836
841
|
await queryAndParse('api_modules', `SELECT * FROM services_public.api_modules WHERE database_id = $1`);
|
|
837
842
|
await queryAndParse('api_extensions', `SELECT * FROM services_public.api_extensions WHERE database_id = $1`);
|
|
838
|
-
await queryAndParse('
|
|
843
|
+
await queryAndParse('api_schemas', `SELECT * FROM services_public.api_schemas WHERE database_id = $1`);
|
|
839
844
|
// =============================================================================
|
|
840
845
|
// metaschema_modules_public tables
|
|
841
846
|
// =============================================================================
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pgpmjs/core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.12.1",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "PGPM Package and Migration Tools",
|
|
6
6
|
"main": "index.js",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@pgpmjs/logger": "^1.3.7",
|
|
53
53
|
"@pgpmjs/server-utils": "^2.8.14",
|
|
54
54
|
"@pgpmjs/types": "^2.14.0",
|
|
55
|
-
"csv-to-pg": "^3.
|
|
55
|
+
"csv-to-pg": "^3.4.0",
|
|
56
56
|
"genomic": "^5.2.3",
|
|
57
57
|
"glob": "^13.0.0",
|
|
58
58
|
"komoji": "^0.7.14",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"pgsql-parser": "^17.9.11",
|
|
65
65
|
"yanse": "^0.1.11"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "c934b1c3c831b236090053a8fc37f15e3a897877"
|
|
68
68
|
}
|