@mikro-orm/cli 7.1.0-dev.25 → 7.1.0-dev.27
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.
|
@@ -62,6 +62,11 @@ export class MigrationCommandFactory {
|
|
|
62
62
|
type: 'string',
|
|
63
63
|
desc: 'Migrate only specified versions',
|
|
64
64
|
});
|
|
65
|
+
args.option('s', {
|
|
66
|
+
alias: 'schema',
|
|
67
|
+
type: 'string',
|
|
68
|
+
desc: 'Target schema to run the migration against (PostgreSQL, MySQL, Oracle)',
|
|
69
|
+
});
|
|
65
70
|
return args;
|
|
66
71
|
}
|
|
67
72
|
static configureCreateCommand(args) {
|
|
@@ -215,11 +220,11 @@ export class MigrationCommandFactory {
|
|
|
215
220
|
CLIHelper.dump(colors.green(`${ret.fileName} successfully created (rollup)`));
|
|
216
221
|
}
|
|
217
222
|
static getUpDownOptions(flags) {
|
|
218
|
-
|
|
219
|
-
return { migrations: flags.only.split(/[, ]+/) };
|
|
220
|
-
}
|
|
221
|
-
const ret = {};
|
|
223
|
+
const ret = !flags.to && !flags.from && flags.only ? { migrations: flags.only.split(/[, ]+/) } : {};
|
|
222
224
|
['from', 'to'].filter(k => flags[k]).forEach(k => (ret[k] = flags[k] === '0' ? 0 : flags[k]));
|
|
225
|
+
if (flags.schema) {
|
|
226
|
+
ret.schema = flags.schema;
|
|
227
|
+
}
|
|
223
228
|
return ret;
|
|
224
229
|
}
|
|
225
230
|
static getUpDownSuccessMessage(method, options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/cli",
|
|
3
|
-
"version": "7.1.0-dev.
|
|
3
|
+
"version": "7.1.0-dev.27",
|
|
4
4
|
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data-mapper",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"copy": "node ../../scripts/copy.mjs"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@mikro-orm/core": "7.1.0-dev.
|
|
54
|
-
"mikro-orm": "7.1.0-dev.
|
|
53
|
+
"@mikro-orm/core": "7.1.0-dev.27",
|
|
54
|
+
"mikro-orm": "7.1.0-dev.27",
|
|
55
55
|
"yargs": "17.7.2"
|
|
56
56
|
},
|
|
57
57
|
"engines": {
|