@pgpmjs/core 4.11.0 → 4.12.0

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',
@@ -342,9 +346,9 @@ const config = {
342
346
  schema_name: 'text'
343
347
  }
344
348
  },
345
- api_schemata: {
349
+ api_schemas: {
346
350
  schema: 'services_public',
347
- table: 'api_schemata',
351
+ table: 'api_schemas',
348
352
  fields: {
349
353
  id: 'uuid',
350
354
  database_id: 'uuid',
@@ -832,7 +836,7 @@ export const exportMeta = async ({ opts, dbname, database_id }) => {
832
836
  await queryAndParse('site_metadata', `SELECT * FROM services_public.site_metadata WHERE database_id = $1`);
833
837
  await queryAndParse('api_modules', `SELECT * FROM services_public.api_modules WHERE database_id = $1`);
834
838
  await queryAndParse('api_extensions', `SELECT * FROM services_public.api_extensions WHERE database_id = $1`);
835
- await queryAndParse('api_schemata', `SELECT * FROM services_public.api_schemata WHERE database_id = $1`);
839
+ await queryAndParse('api_schemas', `SELECT * FROM services_public.api_schemas WHERE database_id = $1`);
836
840
  // =============================================================================
837
841
  // metaschema_modules_public tables
838
842
  // =============================================================================
@@ -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',
@@ -345,9 +349,9 @@ const config = {
345
349
  schema_name: 'text'
346
350
  }
347
351
  },
348
- api_schemata: {
352
+ api_schemas: {
349
353
  schema: 'services_public',
350
- table: 'api_schemata',
354
+ table: 'api_schemas',
351
355
  fields: {
352
356
  id: 'uuid',
353
357
  database_id: 'uuid',
@@ -835,7 +839,7 @@ const exportMeta = async ({ opts, dbname, database_id }) => {
835
839
  await queryAndParse('site_metadata', `SELECT * FROM services_public.site_metadata WHERE database_id = $1`);
836
840
  await queryAndParse('api_modules', `SELECT * FROM services_public.api_modules WHERE database_id = $1`);
837
841
  await queryAndParse('api_extensions', `SELECT * FROM services_public.api_extensions WHERE database_id = $1`);
838
- await queryAndParse('api_schemata', `SELECT * FROM services_public.api_schemata WHERE database_id = $1`);
842
+ await queryAndParse('api_schemas', `SELECT * FROM services_public.api_schemas WHERE database_id = $1`);
839
843
  // =============================================================================
840
844
  // metaschema_modules_public tables
841
845
  // =============================================================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pgpmjs/core",
3
- "version": "4.11.0",
3
+ "version": "4.12.0",
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.3.4",
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": "7c9b2f2b7a2a56a941aafe62cc7f2b4a90afa1bc"
67
+ "gitHead": "67155381d1850ec9fdaf8f80ef1c6b118a6111c7"
68
68
  }