Skip to content

Migration should fail if database name not specified #535

Closed
@mationai

Description

@mationai

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions