This project is archived and is in readonly mode.
Rake tasks db:create and db:drop are not consistent in behaviour
-
Russell Quinn
Patch attached.
-
Kane
i encountered this too, see #5382 rake db:create does not do what the description says
-
Marjan Krekoten'
- Assigned user set to Santiago Pastorino
I think it's nice to have test db created along with development. So I attached another patch which drops also test db while dropping development.
-
Kane
i cant see the point why it should create test db.
-
Russell Quinn
Why not just stick to the currently defined RAILS_ENV like everything else? I really don't think it makes sense to create test just because it's kind of convenient.
But, anyway, whichever way, create and drop need to do the same thing.
-
Jeff Kreeftmeijer
- Importance changed from to Low
I agree
db:createanddb:dropshould do the same thing and I like Russell's patch better. As you said, also dropping the test database seems sneaky.It could use some tests, though. :)
-
Jeff Kreeftmeijer
- State changed from new to open
- Tag changed from activerecord rails3, rake tasks, patch to rake tasks, activerecord, patch
-
Santiago Pastorino
- Assigned user changed from Santiago Pastorino to Mikel Lindsaar
-
viktor tron (strawberry)
is there any update on if and when this change is pushed?
btw this ticket supercedes
https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets... -
ronen barzel
one additional motivation for consistent
db:dropanddb:createbehavior: the taskdb:migrate:resetcalls both so currently yields a warning with every use after the first time. (i was looking for/going to create a ticket ondb:migrate:resetbut found this one.)$ rake db:migrate:reset > /dev/null $ rake db:migrate:reset > /dev/null db/test.sqlite3 already exists $ rake db:migrate:reset > /dev/null db/test.sqlite3 already exists
