aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/tasks
Commit message (Collapse)AuthorAgeFilesLines
* `rake db:create` does not change permissions of root user.Yves Senn2013-03-171-1/+3
| | | | | | | | Closes #8079. I had to rework some of the tests because the mock allowed any arguments for `connection.exeucte`. I think this is very dangerous as there could anything be executed without the tests noticing it.
* rake db:structure:dump warns when `mysqldump` is not in PATH.Yves Senn2013-03-061-1/+4
| | | | | | | | Closes #9518. The rake task used to fail silently and left an empty `structure.sql`. It's confusing for users to get to the root of the problem. The warning message tells them where to look.
* Raise a specific exception with a useful message if a rake task is requested ↵Daniel Azuma2013-01-301-0/+4
| | | | for an unknown adapter
* Improve mysql database tasks handling to ensure we always rescue from an ↵Carlos Antonio da Silva2013-01-151-9/+13
| | | | | | | | | | exception We were previously rescuing "nil" when no exception class was found. This does work in 1.9.3, but does not in 2.0, raising an exception asking for a class or module to be given to the rescue clause. Thanks @yahonda for catching this.
* Fix AR tests due to Mysql constant not being definedCarlos Antonio da Silva2013-01-123-7/+5
|
* Bring back "database already exists" messages when running rake tasksCarlos Antonio da Silva2013-01-124-13/+20
| | | | | | | | | | 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.
* Correct default charset/collation for mysql dbsJeremy Kemper2012-09-211-6/+9
|
* Use default charset/collation only if *neither* is specified. Otherwise we ↵Jeremy Kemper2012-09-211-4/+7
| | | | set utf8_unicode_ci collation on latin1 table.
* 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).
* Use configuration['encoding'], because database configuration use not ↵kennyj2012-09-121-3/+3
| | | | charset but encoding.
* Use native mysqldump command for 'rake db:structure:dump'.kennyj2012-09-121-9/+19
|
* Use the 'mysql' binary for 'rake db:structure:load'.Seamus Abshere2012-09-051-4/+8
| | | | The previous implementation had the strange requirement that db/structure.sql contain only CREATE TABLE sql statements, one per table, separated by double newlines. SQLite3 and PostgreSQL database tasks, on the other hand, simply spawn 'sqlite3' and 'psql' binaries to load the file directly. The new implementation follows this and attempts to respect all current MySQL configuration settings.
* 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
| |
* | Unify the collation API for the database adptersRafael Mendonça França2012-07-011-1/+1
| |
* | Extract collation tasks to database tasks.kennyj2012-07-013-0/+17
|/
* Refactor db:structure:load task.kennyj2012-06-214-0/+24
|
* Refactor db:structure:dump task.kennyj2012-06-204-0/+38
|
* Refactor db:charset taskSimon Jefford2012-06-194-3/+24
| | | | | 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
|
* fix invalid syntax and sqlite rake failing testsFrancesco Rodriguez2012-06-181-2/+3
|
* add :nodoc: to AR::Tasks and update to follow the coding conventionsFrancesco Rodriguez2012-06-184-208/+226
|
* check if sqlite3 file exists before removeFrancesco Rodriguez2012-06-181-3/+3
|
* Rails is the default (but now override able) source for environment and path.Pat Allan2012-06-172-15/+25
|
* Cleaning up after some warnings, adding slightly higher-level tests.Pat Allan2012-06-174-7/+13
|
* 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-174-8/+55
|
* db:create for PostgreSQL pulled out into a class.Pat Allan2012-06-173-4/+33
|
* db:create for MySQL now much cleaner.Pat Allan2012-06-173-7/+107
|
* A beginning of sorts.Pat Allan2012-06-171-0/+14
Minimal implementation that supports db:create SQLite replacement