aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/tasks/database_tasks.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* Bring back "database already exists" messages when running rake tasksCarlos Antonio da Silva2013-01-121-0/+4
| | | | | | | | | | When running tasks such "rake db:setup", instead of showing messages like "db_development already exists", it was showing a big stack trace and a message "Couldn't create database for ..." with the configuration options, a very confusing message with a big trace. This brings back the functionality present in 3-2, showing the same message.
* fixed support for DATABASE_URL for rake db tasksGrace Liu2012-09-111-0/+28
| | | | | | | | | | | | - added tests to confirm establish_connection uses DATABASE_URL and Rails.env correctly even when no arguments are passed in. - updated rake db tasks to support DATABASE_URL, and added tests to confirm correct behavior for these rake tasks. (Removed establish_connection call from some tasks since in those cases the :environment task already made sure the function would be called) - updated Resolver so that when it resolves the database url, it removes hash values with empty strings from the config spec (e.g. to support connection to postgresql when no username is specified).
* removes usage of Object#in? from the code base (the method remains defined ↵Xavier Noria2012-08-061-1/+1
| | | | | | | | | | | | | | | | | | | by Active Support) Selecting which key extensions to include in active_support/rails made apparent the systematic usage of Object#in? in the code base. After some discussion in https://github.com/rails/rails/commit/5ea6b0df9a36d033f21b52049426257a4637028d we decided to remove it and use plain Ruby, which seems enough for this particular idiom. In this commit the refactor has been made case by case. Sometimes include? is the natural alternative, others a simple || is the way you actually spell the condition in your head, others a case statement seems more appropriate. I have chosen the one I liked the most in each case.
* Merge pull request #6838 from kennyj/added_registration_taskCarlos Antonio da Silva2012-07-071-7/+11
|\ | | | | Allow to register database tasks from different adapters
| * Added a feature to add a database task. e.g. OracleDatabaseTaskskennyj2012-06-241-7/+11
| |
* | Extract collation tasks to database tasks.kennyj2012-07-011-0/+9
|/
* Refactor db:structure:load task.kennyj2012-06-211-0/+6
|
* Refactor db:structure:dump task.kennyj2012-06-201-0/+6
|
* Refactor db:charset taskSimon Jefford2012-06-191-0/+9
| | | | | In a similar vein to Pat's work on create, drop etc, the db:charset task is now a one liner in databases.rake
* Make DatabaseTasks a module with real private methodsCarlos Antonio da Silva2012-06-181-13/+14
|
* add :nodoc: to AR::Tasks and update to follow the coding conventionsFrancesco Rodriguez2012-06-181-66/+71
|
* Rails is the default (but now override able) source for environment and path.Pat Allan2012-06-171-12/+18
|
* Cleaning up after some warnings, adding slightly higher-level tests.Pat Allan2012-06-171-3/+3
|
* One line db:create/db:drop tasks.Pat Allan2012-06-171-0/+46
| | | | | | Now isn't that better? And yes, I know that private has no impact on class methods - it's a visual distinction, not a technical one.
* db:drop and some of db:test:purge.Pat Allan2012-06-171-2/+13
|
* db:create for PostgreSQL pulled out into a class.Pat Allan2012-06-171-1/+1
|
* db:create for MySQL now much cleaner.Pat Allan2012-06-171-7/+12
|
* A beginning of sorts.Pat Allan2012-06-171-0/+14
Minimal implementation that supports db:create SQLite replacement