@voxpelli/pg-utils 1.1.1 → 1.2.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.
@@ -72,7 +72,7 @@ export async function csvFromFolderToDb (connection, path, tablesWithDependencie
72
72
 
73
73
  for (const file of files) {
74
74
  const name = pathModule.basename(file, '.csv');
75
- const dbCopy = client.query(copyFrom(`COPY ${name} FROM STDIN DELIMITER ',' CSV HEADER`));
75
+ const dbCopy = client.query(copyFrom(`COPY ${name} FROM STDIN WITH (FORMAT csv, HEADER MATCH)`));
76
76
 
77
77
  // eslint-disable-next-line security/detect-non-literal-fs-filename
78
78
  const csvContent = createReadStream(file);
@@ -9,7 +9,7 @@ export class PgTestHelpers {
9
9
  export type PgTestHelpersOptions = {
10
10
  connectionString: string;
11
11
  fixtureFolder?: string | URL;
12
- schema: string | URL | import("umzug").Umzug;
12
+ schema: string | URL | import("umzug").Umzug<import("umzeption").UmzeptionContext<"pg", import("umzeption").FastifyPostgresStyleDb>>;
13
13
  tablesWithDependencies?: Array<string[] | string>;
14
14
  };
15
15
  import type { Pool } from 'pg';
@@ -1 +1 @@
1
- {"version":3,"file":"test-helpers.d.ts","sourceRoot":"","sources":["test-helpers.js"],"names":[],"mappings":"AAoBA;IAaE,qBADY,oBAAoB,EAiC/B;IAnCD,cADW,IAAI,CAAC,OAAO,CAAC,CACX;IAoEb,cADc,OAAO,CAAC,IAAI,CAAC,CAiB1B;IAGD,kBADc,OAAO,CAAC,IAAI,CAAC,CAM1B;IAGD,gBADc,OAAO,CAAC,IAAI,CAAC,CAM1B;;CACF;;sBArHa,MAAM;oBACN,MAAM,GAAG,GAAG;YACZ,MAAM,GAAG,GAAG,GAAG,OAAO,OAAO,EAAE,KAAK;6BACpC,KAAK,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC;;0BAPZ,IAAI"}
1
+ {"version":3,"file":"test-helpers.d.ts","sourceRoot":"","sources":["test-helpers.js"],"names":[],"mappings":"AAoBA;IAaE,qBADY,oBAAoB,EAiC/B;IAnCD,cADW,IAAI,CAAC,OAAO,CAAC,CACX;IAoEb,cADc,OAAO,CAAC,IAAI,CAAC,CAiB1B;IAGD,kBADc,OAAO,CAAC,IAAI,CAAC,CAM1B;IAGD,gBADc,OAAO,CAAC,IAAI,CAAC,CAM1B;;CACF;;sBArHa,MAAM;oBACN,MAAM,GAAG,GAAG;YACZ,MAAM,GAAG,GAAG,GAAG,OAAO,OAAO,EAAE,KAAK,CAAC,OAAO,WAAW,EAAE,gBAAgB,CAAC,IAAI,EAAE,OAAO,WAAW,EAAE,sBAAsB,CAAC,CAAC;6BAC5H,KAAK,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC;;0BAPZ,IAAI"}
@@ -14,7 +14,7 @@ import { createPgPool, isStringArray, TypeNeverError } from './utils.js';
14
14
  * @typedef PgTestHelpersOptions
15
15
  * @property {string} connectionString
16
16
  * @property {string | URL} [fixtureFolder]
17
- * @property {string | URL | import('umzug').Umzug} schema
17
+ * @property {string | URL | import('umzug').Umzug<import('umzeption').UmzeptionContext<'pg', import('umzeption').FastifyPostgresStyleDb>>} schema
18
18
  * @property {Array<string[] | string>} [tablesWithDependencies]
19
19
  */
20
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voxpelli/pg-utils",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": " My personal database utils / helpers for Postgres",
5
5
  "homepage": "http://github.com/voxpelli/pg-utils",
6
6
  "repository": {