aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/tasks/databases.rake
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Add db:create, drop, reset, charset, and collation tasks. Closes #8448.Jeremy Kemper2007-05-261-0/+64
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6849 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: db:test:purge closes open database connections first. Closes #6236.Jeremy Kemper2006-10-091-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5269 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Firebird database tasks.Jeremy Kemper2006-07-091-0/+20
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4597 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* db:test:clone should remove existing tables before reloading the schema. ↵Jeremy Kemper2006-07-051-5/+5
| | | | | | Closes #5607. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4557 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't assume Active Record is available. Closes #5497.Jeremy Kemper2006-06-281-11/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4505 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Session migration generator obeys pluralize_table_names. Closes #5145.Jeremy Kemper2006-05-221-1/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4360 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add modifications to database rake tasks as part of #5139. ↵Marcel Molina2006-05-211-3/+3
| | | | | | [schoenm@earthlink.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4356 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that rake clone_structure_to_test should quit on pgsql if the dump is ↵David Heinemeier Hansson2006-04-051-0/+1
| | | | | | unsuccesful (closes #4585) [augustz@augustz.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4166 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update descriptionDavid Heinemeier Hansson2006-03-281-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4074 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow load_fixtures to load a subset of total fixture data. [Chad Fowler]Michael Koziarski2006-03-281-10/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4073 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Clearing doesnt need migrationsDavid Heinemeier Hansson2006-03-201-2/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3996 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Replaced old session rake tasks with db:sessions:create to generate a ↵Rick Olson2006-03-201-15/+6
| | | | | | migration, and db:sessions:clear to remove sessions. [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3995 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Silence the migration messages when importing the schema for testsJamis Buck2006-03-051-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3781 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Load, not dump, schema to testDavid Heinemeier Hansson2006-02-271-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3686 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added namespaces to all tasks, so for example load_fixtures is now ↵David Heinemeier Hansson2006-02-271-141/+148
| | | | | | db:fixtures:load. All the old task names are still valid, they just point to the new namespaced names. "rake -T" will only show the namespaced ones, though [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3680 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ignore version mismatch between pg_dump and the database server. Closes #3457.Marcel Molina2006-01-131-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3400 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Honor ActiveRecord::Base.pluralize_table_names when creating and destroying ↵Marcel Molina2005-12-181-3/+7
| | | | | | session store table. Closes #3204. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3317 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make load_fixtures include csv fixtures. Closes #3053.Marcel Molina2005-11-281-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3196 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make the db_schema_dump task honor the SCHEMA environment variable if ↵Marcel Molina2005-11-211-1/+1
| | | | | | present the way db_schema_import does. Closes #2931. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3136 5ecf4fe2-1ee6-0310-87b1-e25e094e27de