aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/tasks/databases.rake
Commit message (Collapse)AuthorAgeFilesLines
* re-enable db:schema:dump so db:migrate:redo dumps the schema after migrating ↵Will Bryant2009-02-061-0/+1
| | | | | | | back up Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1412 state:committed]
* Switch to Rack based session stores.Joshua Peek2008-12-151-1/+1
|
* Merge with docrailsPratik Naik2008-12-071-1/+1
|
* establish mysql connection before dropping databaseAliaksey Kandratsenka2008-12-011-0/+1
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#63 state:committed]
* Manually load the DB config rather than firing the whole initializer [Gerrit ↵Michael Koziarski2008-12-011-4/+9
| | | | Kaiser]
* Make sure recreate MySQL test database with the proper encoding and ↵Luca Guidi2008-10-031-1/+1
| | | | | | | collation [#1165 state:resolved] Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1165 state:committed]
* make db:migrate:redo rake task accept an optional VERSION to target that ↵Philip Hallstrom2008-09-171-2/+10
| | | | | | specific migration to redo Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Fix for SQLite's db creation warnings [status:committed #614]Antonio Cangiano2008-09-091-6/+18
| | | | Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* Revert "Change all databases.rake adapter 'when' statements to use regexes."Nick Sieger2008-08-291-18/+18
| | | | This reverts commit 3d2512d38d2e28b3ea669139f7c7b0307522aa72.
* Change all databases.rake adapter 'when' statements to use regexes.Nick2008-08-291-18/+18
| | | | | | This is more friendly to JRuby/JDBC adapters (with names like 'jdbcmysql') and leaves the door open to alternate implementations of adapters in the future.
* rake db:fixtures:load and db:fixtures:identify now accept a FIXTURES_PATH ↵Matthew Rudy Jacobs2008-08-091-4/+5
| | | | | | | option eg. "rake db:fixtures:load FIXTURES_PATH=spec/fixtures" Signed-off-by: Michael Koziarski <michael@koziarski.com> [#792 state:committed]
* Added db:charset support to PostgreSQL. [#556 state:resolved]Sebastian A. Espindola2008-07-141-0/+3
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Enable loading fixtures from arbitrary locations. [#586 state:resolved]Jacek Becela2008-07-141-4/+7
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Use full path in database tasks so commands will work outside of Rails root ↵Tapajós2008-07-131-10/+10
| | | | | | [#612 state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Rely on quieter db:test:load taskJeremy Kemper2008-06-171-3/+5
|
* Don't dump schema for every test run, just when migrations are runJeremy Kemper2008-06-161-3/+3
|
* Merge docrails.Pratik Naik2008-05-251-1/+1
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Use 'public' schema path when connecting to 'postgres' database. [#170 ↵Tarmo Tänav2008-05-131-2/+2
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Use 'postgres' database instead of 'template1'Tarmo Tänav2008-05-131-2/+2
| | | | | | | | The 'postgres' database is meant for use by utilities and third party applications. CONNECT permission to the 'template1' database is usually only available to superusers which is why 'postgres' should be preferred as users whith "CREATE DATABASE" permissions are not neccessarily superusers.
* PostgreSQL: update rake tasks to use full settings from database.ymlPete Deffendol2008-05-041-8/+3
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* PostgreSQL: Connect to template1 database when creating or dropping dbPete Deffendol2008-05-041-2/+2
| | | | | | | | | | * The template1 database is always available on a PostgreSQL install * The previous behavior expected a database with the same name as the connecting user, which may not be available Signed-off-by: Michael Koziarski <michael@koziarski.com> [#38 state:resolved]
* PostgreSQL: use create_ and drop_database for rake tasks. Closes #9045 [ez, ↵Jeremy Kemper2008-04-011-18/+26
| | | | | | nicksieger] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9183 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed charset/collation for rake db:create (closes #11331) [matt]David Heinemeier Hansson2008-03-311-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9170 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix new migration versionsDavid Heinemeier Hansson2008-03-281-0/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9126 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Switched to UTC-timebased version numbers for migrations and the schema. ↵David Heinemeier Hansson2008-03-281-2/+15
| | | | | | This will as good as eliminate the problem of multiple migrations getting the same version assigned in different branches. Also added rake db:migrate:up/down to apply individual migrations that may need to be run when you merge branches (closes #11458) [jbarnette] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9122 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix database rake tasks to work with charset/collation and show proper error ↵Pratik Naik2008-03-101-3/+8
| | | | | | messages on failure. Closes #11301 [matt] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9004 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Clear active connections before trying to drop the database. Allows db:drop ↵Michael Koziarski2008-02-151-0/+1
| | | | | | to work with posgresql. Closes #10559 [jqr] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8876 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactor check for local databases (closes #10539) [parcelbrat]David Heinemeier Hansson2008-01-031-11/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8535 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* db:sessions:clear task uses session_table_name method. Closes #10631 [Cheah ↵Jeremy Kemper2008-01-021-3/+1
| | | | | | Chu Yeow] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8522 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQLite: db:drop:all doesn't fail silently if the database is already open. ↵Jeremy Kemper2008-01-021-1/+1
| | | | | | Closes #10577. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8519 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that local database creation should consider 127.0.0.1 local (closes ↵David Heinemeier Hansson2007-12-141-1/+1
| | | | | | #9026) [parcelbrat] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8388 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added db:migrate:redo and db:migrate:reset for rerunning existing migrations ↵David Heinemeier Hansson2007-12-141-0/+3
| | | | | | #10431, (closes #10432) [matt] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8383 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added db:migrate:redo for rerunning existing migrations (closes #10431) [matt]David Heinemeier Hansson2007-12-141-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8382 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't check for pending migrations if Active Record isn't loadedJeremy Kemper2007-12-091-7/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8338 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* The test task stops with a warning if you have pending migrations. Closes ↵Jeremy Kemper2007-12-061-1/+14
| | | | | | #10377. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8324 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added db:fixtures:identity as a way of locating what ID a foxy fixture was ↵David Heinemeier Hansson2007-12-011-0/+22
| | | | | | assigned (closes #10332) [jbarnette] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8248 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that db:reset would use migrations instead of loading db/schema.rb [DHH]David Heinemeier Hansson2007-11-091-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8123 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added db:rollback to rollback the schema one version (or multiple as ↵David Heinemeier Hansson2007-10-261-0/+7
| | | | | | specified by STEP) [Jeffrey Allan Hardy] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8039 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* db:create works with remote databases whereas db:create:all only ↵Jeremy Kemper2007-10-021-31/+50
| | | | | | createsdatabases on localhost. Closes #9753. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7718 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Follow our own conventions (closes #6506) [packagethief]David Heinemeier Hansson2007-09-231-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7603 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Revert [7574]. Closes #7521.Jeremy Kemper2007-09-231-5/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7594 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added rake db:version to get the current schema version from the command ↵David Heinemeier Hansson2007-09-221-0/+5
| | | | | | line (closes #7521) [pelargir] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7574 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added VERBOSE option to rake db:migrate to turn off output #8204 [jbarnette]David Heinemeier Hansson2007-09-221-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7566 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added db:drop:all to drop all databases declared in config/database.yml [DHH]David Heinemeier Hansson2007-09-151-11/+22
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7489 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix task description for db:sessions:create. Closes #9419 [topfunky]Michael Koziarski2007-09-021-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7398 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* db:create creates the database for the current environment if it's on ↵Jeremy Kemper2007-06-281-91/+107
| | | | | | localhost. db:create:all creates local databases for all environments. Closes #8783. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7147 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added db:version to get the current schema number [via Tim Bray]David Heinemeier Hansson2007-06-251-3/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7110 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Docfix (closes #8480)David Heinemeier Hansson2007-06-231-5/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7104 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Skip databases that couldn't be created.Jeremy Kemper2007-05-301-3/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6900 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQLite: db:create and dropJeremy Kemper2007-05-261-1/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6853 5ecf4fe2-1ee6-0310-87b1-e25e094e27de