Skip to content

Commit

Permalink
minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
GarretTomlin committed Sep 15, 2023
1 parent deb5914 commit 405675e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/dirty-jars-play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"kysely-migrator-cli": minor
---

minor updates
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "kysely-migrator-cli",
"module": "commonjs",
"main": "./src/bin/migrator.ts",
"version": "1.4.0",
"version": "1.5.0",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
5 changes: 4 additions & 1 deletion src/commands/migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ const migrate: GluegunCommand = {
`Failed to execute migration "${migrationResult.migrationName}"`
);
}
else{
print.info('nothing to migrate')
}
});

if (error) {
Expand All @@ -80,7 +83,7 @@ function extractErrorMessage(error: any): string {
return `Table "${match[1]}" already exists.`;
}
}
return 'An error occurred during migration, please make sure you provided a database connection.';
return 'An error occurred during migration, please make sure DATABASE_URL is define in your env';
}


Expand Down
2 changes: 1 addition & 1 deletion src/commands/rollback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const migrateDown: GluegunCommand = {
print.error(
`Failed to roll back migration "${migrationResult.migrationName}"`,
);
} else if (migrationResult.status === 'NotExecuted') {
} else {
print.info('No migration to roll back');
}
});
Expand Down
3 changes: 3 additions & 0 deletions src/commands/run-all-migrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ const runAllMigrations: GluegunCommand = {
`Failed to execute migration "${migrationResult.migrationName}"`,
);
}
else{
print.info('nothing to migrate')
}
});

if (error) {
Expand Down

0 comments on commit 405675e

Please sign in to comment.