stepwise-migrations 1.0.27 → 1.0.28

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,6 +1,6 @@
1
1
  {
2
2
  "name": "stepwise-migrations",
3
- "version": "1.0.27",
3
+ "version": "1.0.28",
4
4
  "description": "A JavaScript CLI tool for managing Raw SQL migrations in a Postgres database. Loosely based on flyway.",
5
5
  "main": "./dist/src/index.js",
6
6
  "scripts": {
package/src/db/pg.ts CHANGED
@@ -10,10 +10,9 @@ pg.types.setTypeParser(1082, function (stringValue) {
10
10
  return stringValue; //1082 for date type
11
11
  });
12
12
 
13
- export const _dbConnect = async ({ ssl, connection, schema }: Args) => {
13
+ export const _dbConnect = async ({ connection, schema }: Args) => {
14
14
  const pool = new Pool({
15
15
  connectionString: connection,
16
- ssl: ssl === "true",
17
16
  });
18
17
 
19
18
  let client: PoolClient | undefined;
package/src/index.ts CHANGED
@@ -91,11 +91,6 @@ const main = async () => {
91
91
  alias: "s",
92
92
  describe: "The schema to use for the migrations",
93
93
  },
94
- ssl: {
95
- type: "boolean",
96
- default: false,
97
- describe: "Whether to use SSL for the connection",
98
- },
99
94
  path: {
100
95
  type: "string",
101
96
  default: "./",
package/src/utils.ts CHANGED
@@ -34,7 +34,6 @@ Options:
34
34
  --connection <connection> The connection string to use to connect to the database
35
35
  --schema <schema> The schema to use for the migrations (default: public)
36
36
  --path <path> The path to the migrations directory
37
- --ssl true/false Whether to use SSL for the connection (default: false)
38
37
  --napply Number of up migrations to apply (default: all)
39
38
  --nundo Number of undo migrations to apply (default: 1)
40
39
  --filename (get-applied-script) The filename to get the script for (default: last applied migration)
@@ -42,7 +41,7 @@ Options:
42
41
 
43
42
  Example:
44
43
  npx stepwise-migrations migrate \
45
- --connection=postgresql://postgres:postgres@127.0.0.1:5432/mydatabase \
44
+ --connection=postgresql://postgres:postgres@127.0.0.1:5432/mydatabase\?sslmode=require \
46
45
  --schema=myschema \
47
46
  --path=./test/migrations-template/
48
47
  `;
@@ -55,7 +54,6 @@ export type Args = {
55
54
  filePath: string;
56
55
  connection: string;
57
56
  filename?: string;
58
- ssl: string;
59
57
  };
60
58
 
61
59
  export const parseArgs = (argv: any): Args => {
@@ -65,7 +63,6 @@ export const parseArgs = (argv: any): Args => {
65
63
  const nundo = argv.nundo || 1;
66
64
  const filePath = argv.path;
67
65
  const connection = argv.connection;
68
- const ssl = argv.ssl ?? "false";
69
66
  const filename = argv.filename;
70
67
 
71
68
  return {
@@ -75,7 +72,6 @@ export const parseArgs = (argv: any): Args => {
75
72
  nundo,
76
73
  filePath,
77
74
  connection,
78
- ssl,
79
75
  filename,
80
76
  };
81
77
  };