stepwise-migrations 1.0.23 → 1.0.24
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/README.md +2 -2
- package/dist/src/utils.js +3 -2
- package/package.json +1 -1
- package/src/utils.ts +2 -2
package/README.md
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
A JavaScript CLI tool for managing Raw SQL migrations in a Postgres database.
|
4
4
|
Loosely based on flyway.
|
5
5
|
|
6
|
-
|
7
|
-

|
7
|
+

|
8
8
|
|
9
9
|
## Table of Contents
|
10
10
|
|
package/dist/src/utils.js
CHANGED
@@ -52,7 +52,8 @@ Example:
|
|
52
52
|
--path=./test/migrations-template/
|
53
53
|
`;
|
54
54
|
const parseArgs = (argv) => {
|
55
|
-
|
55
|
+
var _a;
|
56
|
+
const schema = (_a = argv.schema) !== null && _a !== void 0 ? _a : "public";
|
56
57
|
const command = argv._[0];
|
57
58
|
const napply = argv.napply || Infinity;
|
58
59
|
const nundo = argv.nundo || 1;
|
@@ -61,7 +62,7 @@ const parseArgs = (argv) => {
|
|
61
62
|
};
|
62
63
|
exports.parseArgs = parseArgs;
|
63
64
|
const validateArgs = (argv) => {
|
64
|
-
const required = ["connection", "
|
65
|
+
const required = ["connection", "path", "_"];
|
65
66
|
if (required.some((key) => !(key in argv))) {
|
66
67
|
console.error("Missing required arguments", required.filter((key) => !(key in argv)));
|
67
68
|
console.log(exports.usage);
|
package/package.json
CHANGED
package/src/utils.ts
CHANGED
@@ -46,7 +46,7 @@ Example:
|
|
46
46
|
`;
|
47
47
|
|
48
48
|
export const parseArgs = (argv: any) => {
|
49
|
-
const schema = argv.schema;
|
49
|
+
const schema = argv.schema ?? "public";
|
50
50
|
const command = argv._[0];
|
51
51
|
const napply = argv.napply || Infinity;
|
52
52
|
const nundo = argv.nundo || 1;
|
@@ -56,7 +56,7 @@ export const parseArgs = (argv: any) => {
|
|
56
56
|
};
|
57
57
|
|
58
58
|
export const validateArgs = (argv: any) => {
|
59
|
-
const required = ["connection", "
|
59
|
+
const required = ["connection", "path", "_"];
|
60
60
|
if (required.some((key) => !(key in argv))) {
|
61
61
|
console.error(
|
62
62
|
"Missing required arguments",
|