-
-
Notifications
You must be signed in to change notification settings - Fork 525
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:create should not fail if the database does exist #629
Comments
@sushantdhiman Would you accept PRs for this issue? I was thinking of simply adding the |
Ok, I just tried doing this but it is more complicated that it seems. |
To correctly solve this you need to add I will accept such PR for sequelize |
I'm trying to use these API to solve #698 . |
@ALiangLiang and @sushantdhiman was this functionality added? If so, what is the option to pass? If it wasn't added, why was this issue closed? I think this should be re-opened. |
I agree with @cjancsar. We need either silent creation failing in case of EXISTS or an option to force that behavior. |
Is there any recent informations about this behaviour? It does not seem to work as expected with: Dialect: postgres It still throws an error in case of an existing database. |
Hello, I am in need of this function as I'm trying to integrate the creation of dbs in my code if they don't exist but if they already exist it shouldn't throw an error and exit the code, in order to continue with the commands |
It seems this issue is not fixed for postgres |
Indeed this has not been fixed for postgres. Feel free to create a new issue or add support for it through a PR. |
What you are doing?
What do you expect to happen?
When the database does exist, I expect the command to exit with status code 0
What is actually happening?
The command fails with exit code 1
Dialect: mysql
Sequelize CLI version: 4.0.0
Sequelize version: 4.36.1
The text was updated successfully, but these errors were encountered: