I come from a Rails background and think it'd be pretty convenient to have sequelize db:create and sequelize db:drop as part of the cli.
Since I only use Postgres I wrote two scripts to achieve this and published it under sequelize-migration-pg-extras.
If you could give some advice on how to go about adding native support, I'd be willing to try writing a PR.
Hi Cesar,
I agree :) In fact I actually created a ticket for that some time ago (as you have already seen).
The first step would be a PR for the sequelize core which adds the respective queries (as this is currently not implemented). I'd assume that this is fairly easy, but I'm not entirely sure. Once the core supports something like sequelize.createDatabase and sequelize.dropDatabase we can add the stuff to the CLI. This basically means, it would be necessary to add another key value pair here:
https://github.com/sequelize/cli/blob/master/lib/tasks/db.js#L81
Oh, I completely forgot about that. I'll take a look, sounds good.
Would love this. Does a ticket need to be opened at sequelize proper for adding sequielize.createDatabase and sequelize.dropDatabase?
Hm, could not harm, though this ticket might be good enough already
+1
PRs are welcome :)
+1
+1
:+1:
+1
+1
+1
+1
+1
@joost @Catchpowle @anthony-ism
Since March 10, 2016, it is possible to use emoji reactions on comments. Please use the 馃憤 reaction to show your interest instead of commenting "+1". This saves everyone in the thread a notification. If you want to get updates on the issue in the future, you can use the "Subscribe" button. Thank you ! 馃槃
Has anything been done on adding these? At present this is the only thing(s) stopping me from using sequelize in my companies project.
I also think that this feature would be very helpful.
Hahaha.. I also would love to see this feature. 馃憤
+1
+1
+1
@Kae2312 are you just randomly commenting +1 on issues :), its already available in v3.0
@sushantdhiman I think the command sequelize db:drop must add IF EXISTS;
sequelize db:create should have support for IF NOT EXISTS as a flag --if-not-exists
@itsashis4u There is an issue for this problem: #629.
@juliocanares There is an issue for this problem: #599
Most helpful comment
@sushantdhiman I think the command
sequelize db:dropmust addIF EXISTS;