Skip to content

Commit dece379

Browse files
authored
Merge pull request #128 from nikolay-karadzhov/issue-127-fails-when-no-migrations-available
add --if-exists flag to migrate command
2 parents 5ecb076 + b1dc818 commit dece379

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

dist/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41798,7 +41798,7 @@ function migrate(keepMigrationsFile) {
4179841798
env: Object.assign(Object.assign({}, process.env), { npm_config_yes: String(true) })
4179941799
});
4180041800
yield (0, exec_1.exec)('npm install');
41801-
yield (0, exec_1.exec)('npx nx migrate --run-migrations=migrations.json --create-commits', [], {
41801+
yield (0, exec_1.exec)('npx nx migrate --run-migrations=migrations.json --if-exists --create-commits', [], {
4180241802
env: Object.assign(Object.assign({}, process.env), { npm_config_yes: String(true), NX_MIGRATE_SKIP_INSTALL: String(true) })
4180341803
});
4180441804
// sometimes migrations change packages without installing them, so naivly install dependencies here again

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/nx-migrate.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export async function migrate(keepMigrationsFile: boolean): Promise<void> {
1010
})
1111
await exec('npm install')
1212
await exec(
13-
'npx nx migrate --run-migrations=migrations.json --create-commits',
13+
'npx nx migrate --run-migrations=migrations.json --if-exists --create-commits',
1414
[],
1515
{
1616
env: {

0 commit comments

Comments
 (0)