Skip to content

Create/Drop database set on config #499

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
wants to merge 1 commit into from
Closed

Create/Drop database set on config #499

wants to merge 1 commit into from

Conversation

dmmartins
Copy link

It doesn't make sense to specify database name on db:create when you have database set on config file and migrations depend on that config.
Somehow related to #468.

@wzrdtales
Copy link
Member

@dmmartins I think your suggested change would be confusing and the current implementation speaks like what it does.

What I could think of instead would be an init command, as db:create says: I create a db, but to imply that the config is interpreted here and it takes the db name, would be an unexpected behaviour. So I would rather do the thing mentioned before instead of altering the command in this way you suggested.

@dmmartins
Copy link
Author

It should be consistent. Currently you need to pass the database name on db create but you can't do that for migrations.
So if you have database name set in config file you can't create the database because it tries to connect to the database that doesn't exist. If you remove database name from config, you can't run migrations.

Do you think (optionally) passing database name on migrations would be better?

@stale
Copy link

stale bot commented Nov 23, 2017

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.

@stale stale bot added the stale label Nov 23, 2017
@stale stale bot closed this Nov 30, 2017
@Ajaxy
Copy link

Ajaxy commented May 8, 2018

Any update on this?

@aprakash-sovrn
Copy link

+1

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

Successfully merging this pull request may close these issues.

4 participants