Skip to content

Migration should fail if database name not specified #535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mationai opened this issue Jan 17, 2018 · 1 comment
Closed

Migration should fail if database name not specified #535

mationai opened this issue Jan 17, 2018 · 1 comment
Labels

Comments

@mationai
Copy link

mationai commented Jan 17, 2018

I'm submitting a...


[x] Bug report  
[ ] Feature request

Current behavior

If "database": "name" is not specified in database.json, tables are not created nor dropped during migration but it gives the indication that it does by giving the same "Processed migration ..." message.

Expected behavior

Migration should fail with appropriate message.

Minimal reproduction of the problem with instructions

As specified above with pg. database.json used:

{
  "defaultEnv": "local",
  "local": {
    "driver": "pg",
    "user": "postgres",
    "password": "",
    "host": "localhost",
    "schema": "public"
  }
}

What is the motivation / use case for changing the behavior?

Was experimenting if can get migration to create the database, so removed the database field. After created database via command line, forgot to enter it. Debugging would have been much easier had it failed with message.

Environment

node 9.3, OSX High Sierra

@stale
Copy link

stale bot commented Feb 17, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant