aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/railties
Commit message (Collapse)AuthorAgeFilesLines
* The console --sandbox transaction should not be joinableJon Leighton2013-03-081-1/+2
| | | | Thanks @neerajdotname for noticing this bug.
* Fix rails console --sandboxJon Leighton2013-03-081-2/+2
| | | | | | I've also added a proper acceptance test which reproduced the issue. Closes #9513, #9515.
* Remove hard coded references to Active Record in railtiesJosé Valim2013-03-021-1/+1
|
* fix db_runtime attribute value after raising ActionView::MissingTemplate ↵Igor2013-02-271-1/+2
| | | | exception
* Remove pre-emptive adapter name check from databases.rake so third party ↵Daniel Azuma2013-01-291-9/+3
| | | | adapters can register rake tasks
* Revert "Merge pull request #8930 from cordawyn/ordered_railties"Carlos Antonio da Silva2013-01-151-1/+1
| | | | | | | | | | This reverts commit 8348f9ea72c9b50fc4d4462fd9ebe3bba932c783, reversing changes made to 9dfe2d6f9fabddf9a451a995678a9648c8aaf401. Reason: this broke railties tests as explained in the issue, and the author is going to review and report back. https://github.com/rails/rails/pull/8930#issuecomment-12272671
* rake railties:install:migrations respects the order of railtiesSlava Kravchenko2013-01-141-1/+1
|
* Fix missing ending newline in db structure dump:Thibault Jouan2012-12-301-1/+3
| | | | | | | | | | | When dumping database structure with `rake db:structure:dump` and using migrations, the resulting file will not end with a newline char. Although it's not mandatory, it breaks a lot of simple use cases with programs like cat, more, grep, etc. This changes use `puts' instead of `<<' to append migration versions data to the dump and also split the line where this is happening as it was a bit long.
* Shush deprecation warning due to initializing a Migrator with migration ↵Jeremy Kemper2012-12-121-1/+1
| | | | paths rather than migrations. Use Migrator.open(paths) instead. Thanks @rubys!
* Don't use test environment by default when running rake db:structure:load; #7951Martin Grandrath2012-10-181-1/+1
| | | | | `ENV['RAILS_ENV']` is not defined unless explicitly specified on the command line when running `rake db:structure:load`.
* Rename "Fixtures" class to "FixtureSet"Alexey Muranov2012-10-071-3/+3
| | | | Rename `ActiveRecord::Fixtures` class to `ActiveRecord::FixtureSet`. Instances of this class normally hold a collection of fixtures (records) loaded either from a single YAML file, or from a file and a folder with the same name. This change make the class name singular and makes the class easier to distinguish from the modules like `ActiveRecord::TestFixtures`, which operates on multiple fixture sets, or `DelegatingFixtures`, `::Fixtures`, etc., and from the class `ActiveRecord::Fixture`, which corresponds to a single fixture.
* nodoc AR::Railtie [ci skip]Francesco Rodriguez2012-09-211-2/+2
|
* Load the environment after creating the databaseJeremy Kemper2012-09-191-2/+2
|
* Revert "Make sure :environment task is executed before db:schema:load or ↵Jeremy Kemper2012-09-191-2/+2
| | | | | | | | db:structure:load " Breaks db:setup because it tries to load the environment before creating the database. This reverts commit 5ca11fefce6d83f5db399aa4412f1f1a0d42b2e6.
* Store the transaction number in the transaction objectJon Leighton2012-09-151-2/+0
| | | | This avoids us having to manually increment and decrement it.
* fixed support for DATABASE_URL for rake db tasksGrace Liu2012-09-111-29/+31
| | | | | | | | | | | | - 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).
* Extract ActiveRecord::SessionStore from RailsPrem Sichanugrist2012-08-241-15/+0
| | | | | This functionality will be available from gem `active_record-session_store` instead.
* Merge pull request #7140 from seamusabshere/patch-1Rafael Mendonça França2012-08-051-2/+2
|\ | | | | | | | | Make sure :environment task is executed before db:schema:load or db:structure:load
| * Make sure :environment task is executed before db:schema:load or ↵Seamus Abshere2012-07-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | db:structure:load Otherwise, if schema_format = :sql, you will see: $ rake db:setup --trace ** Invoke db:setup (first_time) ** Invoke db:schema:load_if_ruby (first_time) ** Invoke db:create (first_time) ** Invoke db:load_config (first_time) ** Invoke rails_env (first_time) ** Execute rails_env ** Execute db:load_config ** Execute db:create db_example_development already exists db_example_test already exists ** Execute db:schema:load_if_ruby #<-------- :environment hasn't been executed yet ** Invoke db:schema:load (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:schema:load ~/db_example/db/schema.rb doesn't exist yet. Run `rake db:migrate` to create it then try again.
* | removes usage of Object#in? from the code base (the method remains defined ↵Xavier Noria2012-08-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Remove `:rails_env` task since it is not needed anymore.Rafael Mendonça França2012-08-021-9/+9
| |
* | Only require the `:rails_env` task where is needed.Rafael Mendonça França2012-07-271-12/+12
|/ | | | | | | | | | | | | `:rails_env` tasks is not needed in all the tasks that depends of `load_config`, only in the tasks that uses `Rails.env`. Since `:rails_env` task set the `Rails.env` to be "development" if it is not set we don't need the `||` statements too Fix #7175. Conflicts: activerecord/lib/active_record/railties/databases.rake
* Fix collation database task to use begin..rescue..endCarlos Antonio da Silva2012-06-301-4/+6
|
* Extract collation tasks to database tasks.kennyj2012-07-011-8/+3
|
* Remove unused responsibilities and add a few load definitions to enginesJosé Valim2012-06-291-1/+1
| | | | | | | | Since plugins were removed, we can clean up a few methods in engines. We also use this opportunity to move `load_console`, `load_tasks` and `load_runner` to Rails::Engine. This means that, if someone wants to improve script/rails for engines to support console or runner commands, part of the work is already done.
* Fix wrong environment. env should be RAILS_ENV or test.kennyj2012-06-281-1/+1
|
* Move to db:structure namespace, because these methods are global.kennyj2012-06-261-8/+9
|
* Remove session_table_name method because this is global and used only once.kennyj2012-06-261-5/+1
|
* Add a description about ENV["SCOPE"]kennyj2012-06-261-1/+1
|
* Change the behavior of db:test:prepare task when schema_format is sql for ↵kennyj2012-06-261-1/+1
| | | | consistency.
* Change the behavior of db:test:clone task when schema_format is sql for ↵kennyj2012-06-261-1/+11
| | | | consistency.
* Change an order of methods for readbility.kennyj2012-06-261-7/+7
|
* Refactor db:structure:load task.kennyj2012-06-211-19/+2
|
* Refactor db:structure:dump task.kennyj2012-06-201-13/+3
|
* Refactor db:charset taskSimon Jefford2012-06-191-14/+1
| | | | | In a similar vein to Pat's work on create, drop etc, the db:charset task is now a one liner in databases.rake
* Merge pull request #6761 from freelancing-god/db-rakeJon Leighton2012-06-171-156/+6
|\ | | | | Get logic out of db rake tasks, and into classes and objects
| * One line db:create/db:drop tasks.Pat Allan2012-06-171-55/+4
| | | | | | | | | | | | 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-42/+8
| |
| * db:create for PostgreSQL pulled out into a class.Pat Allan2012-06-171-32/+7
| |
| * db:create for MySQL now much cleaner.Pat Allan2012-06-171-30/+1
| |
| * A beginning of sorts.Pat Allan2012-06-171-12/+1
| | | | | | | | Minimal implementation that supports db:create SQLite replacement
* | Adding `load_config` task as dependency.Cairo Noleto2012-06-161-14/+14
| | | | | | | | Without this, some tasks won't load configurations like custom engines.
* | Don't read csv file during executing db:fixtures:load.kennyj2012-06-171-1/+1
|/
* Merge pull request #4132 from Juanmcuello/clone_structureAaron Patterson2012-05-251-0/+1
|\ | | | | Reset postgreSQL search path in db:test:clone_structure.
| * Reset postgreSQL search path in db:test:clone_structure.Juan M. Cuello2011-12-221-0/+1
| | | | | | | | | | | | | | | | This patch resets the postgres search path in the structure.sql after the structure is dumped in order to find schema_migrations table when multiples schemas are used. Fixes #945
* | Merge pull request #5925 from Juanmcuello/pg_structure_dumpCarlos Antonio da Silva2012-05-241-2/+2
| | | | | | | | Quote arguments in db:structure:dump for PostgreSQL.
* | Fix GH #5435. db:structure:dump should be reenable.kennyj2012-03-171-0/+1
| |
* | Merge pull request #5162 from kennyj/schema_cache_dumpAaron Patterson2012-03-071-0/+19
|\ \ | | | | | | [Proposal] Schema cache dump
| * | Add db:schema:cache:dump and db:schema:cache:clear tasks.kennyj2012-03-011-0/+19
| | |
* | | Merge pull request #5305 from arunagw/warning_fixVijay Dev2012-03-071-1/+1
|\ \ \ | | | | | | | | warning fix : mismatched indentations at 'end' with 'case'