-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
db-migrate db:create
not working as intended
#468
Comments
Just had the same problem. Maybe you should rename the issue because that is a big issue. |
I ran into this as well when trying to set up a new project using db-migrate. If you remove the database name from What I expected was:
EDIT: I'm using MySql and I don't know if this same issue applies to the other database servers. |
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. |
I'm also having the same issue. If I don't specify the database at I think the expected behavior should be like @deegale described. |
I am having an issue where when I do |
@zaidqureshi2 @bernardocs @deegale I just solved with some magic: TLDR: Turning off the magic flag of First I have the following
and the database.json:
So a basic configuration. The
The commands I use:
Since the creation and syncing are two separate steps a new connection will be created everytime. Hope this helps you! |
Any update on this? |
@oroce Then no issues in Thanks for help |
Due to issue db-migrate/node-db-migrate#468 we have to make sure not to specify a database when running `db-migrate db:create`
Due to issue db-migrate/node-db-migrate#468 we have to make sure not to specify a database when running `db-migrate db:create`
This occurs when trying to use Postgres as well. My driver is "pg", and I've installed
I have tried with and without adding On db-migrate 0.11.3, btw. |
Experiencing the same issue. I guess it tries to connect first using the config, then run db:create |
* avoid connecting to database before creation. Signed-off-by: Wenshan Ren <renws1990@gmail.com>
I've added a fix, ready for review @wzrdtales |
Fix #468: avoid connecting to database before creation.
This has not been resolved in |
Running 0.11.14 as well. Workaround still works but issue still exists. |
I've been playing around for most of the morning with db-migrate and getting myself familiar with the ins and outs. One thing I have noticed is that the db:create command doesn't seem to work as I would have expected it.
For example in my
database.json
I have configuration for a test database and a dev database. Now, when I run thedb-migrate db:create myapptest
I would expect to see that it creates a database to run my tests against. instead I get the following error:[ERROR] Error: ER_BAD_DB_ERROR: Unknown database 'myapptest'
the whole reason for running the
db:create
command is because that database doesn't exist and I want to create it.Yet if I create the database and then run the command passing a a random name it will happily create any database I want. It will also claim that I have created the same database multiple times even when it has in fact created it once.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: