- 30 6月, 2015 2 次提交
- 17 6月, 2015 1 次提交
-
-
由 Mehmet Emin İNAÇ 提交于
revert create and drop task descriptions
-
- 16 6月, 2015 1 次提交
-
-
由 Arthur Neves 提交于
db:reset should not prematurely load the environment, so, for instance, if there is any initializer that touches th DB, it will not touch that before droping it. Also this makes the code simpler. This changed was made back in 15fb4302 , not sure why. But I am pretty much sure we should do it like this, as drop and setup should load its dependencies tasks if necessary.
-
- 05 5月, 2015 1 次提交
-
-
由 Steven Davidovitz 提交于
-
- 27 4月, 2015 1 次提交
-
- 12 2月, 2015 1 次提交
-
-
由 Tamir Duberstein 提交于
-
- 08 1月, 2015 1 次提交
-
-
由 Dieter Komendera 提交于
`rake test:load_structure` already uses `SCHEMA` and there's no need to maintain two different env vars.
-
- 23 12月, 2014 1 次提交
-
-
由 Yves Senn 提交于
-
- 05 12月, 2014 1 次提交
-
-
由 Caleb Thompson 提交于
All of the behavior :environment was giving (that db:schema:load needed) was provided as well with :load_config. This will address an issue introduced in https://github.com/rails/rails/pull/15394. The fact that db:schema:load now drops and creates the database causes the Octopus gem to have [an issue](https://github.com/tchandy/octopus/issues/273) during the drop step for the test database (which wasn't happening in db:schema:load before). The error looks like: ActiveRecord::StatementInvalid: PG::ObjectInUse: ERROR: cannot drop the currently open database : DROP DATABASE IF EXISTS "app_test" Because of the timing, this issue is present in master, 4-2-*, and 4.1.8. A note to forlorn developers who might see this: "Additionally" in a commit message means you should have a separate commit, with a separate justification for changes. Small commits with big messages are your friends.
-
- 29 11月, 2014 1 次提交
-
-
由 Erik Michaels-Ober 提交于
-
- 26 11月, 2014 1 次提交
-
-
由 Yves Senn 提交于
This reverts deprecations added in #13528. The task is brought back for two reasons: 1. Give plugins a way to hook into the test database initialization process 2. Give the user a way to force a test database synchronization While `test:prepare` is still a dependency of every test task, `db:test:prepare` no longer hooks into it. This means that `test:prepare` runs before the schema is synchronized. Plugins, which insert data can now hook into `db:test:prepare`. The automatic schema maintenance can't detect when a migration is rolled-back, modified and reapplied. In this case the user has to fall back to `db:test:prepare` to force the synchronization to happen.
-
- 03 11月, 2014 2 次提交
-
-
由 Andrew White 提交于
-
由 yuuji.yaginuma 提交于
This reverts commit 482fdad5. Fixes #17237.
-
- 29 9月, 2014 1 次提交
-
-
由 Erik Michaels-Ober 提交于
Hash#keys.each allocates an array of keys; Hash#each_key iterates through the keys without allocating a new array. This is the reason why Hash#each_key exists.
-
- 06 8月, 2014 1 次提交
-
-
由 Yves Senn 提交于
The rake tasks and the `DatabaseTakss` adapter classes used to assume a configuration at some places. This forced the rake tasks to establish a specific connection before calling into `load_schema`. After #15394 this started to cause issues because it could `purge` the wrong database before loading the schema.
-
- 01 8月, 2014 1 次提交
-
-
由 Jack Danger Canty 提交于
This extracts the logic that was embedded in a Rake task into a static method. Bonus: the first test for `rake db:migrate`
-
- 28 6月, 2014 2 次提交
-
-
由 Viktar Basharymau 提交于
-
由 Viktar Basharymau 提交于
-
- 27 6月, 2014 10 次提交
-
-
由 Viktar Basharymau 提交于
-
由 Viktar Basharymau 提交于
It allows the code to be more declarative and elegant.
-
由 Viktar Basharymau 提交于
-
由 Viktar Basharymau 提交于
-
由 Viktar Basharymau 提交于
`ActiveRecord::FixtureSet.create_fixtures` can accept an array of fixture_files.
-
由 Viktar Basharymau 提交于
-
由 Viktar Basharymau 提交于
-
由 Viktar Basharymau 提交于
-
由 Viktar Basharymau 提交于
Before this commit, if `ENV['FIXTURES_PATH']` was set, then `Rails.root` was used, otherwise the app used `ActiveRecord::Tasks::DatabaseTasks.root`. Now it is consistent.
-
由 Viktar Basharymau 提交于
-
- 17 6月, 2014 1 次提交
-
-
由 Yves Senn 提交于
-
- 06 6月, 2014 1 次提交
-
-
由 Yves Senn 提交于
The migration numbers were normalized different ways. This left the task output in an inconsistent state. Closes #15538.
-
- 27 5月, 2014 1 次提交
-
-
由 Arun Agrawal 提交于
This PR fixes #8930 and some stuff from #8985
-
- 08 5月, 2014 1 次提交
-
-
由 Paul B 提交于
-
- 03 5月, 2014 1 次提交
-
-
由 Greg Molnar 提交于
-
- 29 3月, 2014 1 次提交
-
-
由 Kelley Reynolds 提交于
-
- 20 3月, 2014 1 次提交
-
-
由 Yves Senn 提交于
-
- 14 2月, 2014 1 次提交
-
-
由 Philippe Creux 提交于
-
- 06 2月, 2014 1 次提交
-
-
由 Emil Soman 提交于
* Add a config on Active Record named `dump_schema_after_migration` * Schema dump doesn't happen if the config is set to false * Set default value of the config to true * Set config in generated production environment file to false * Update configuration guide * Update CHANGELOG
-
- 10 1月, 2014 1 次提交
-
-
由 schneems 提交于
Currently Active Record can be configured via the environment variable `DATABASE_URL` or by manually injecting a hash of values which is what Rails does, reading in `database.yml` and setting Active Record appropriately. Active Record expects to be able to use `DATABASE_URL` without the use of Rails, and we cannot rip out this functionality without deprecating. This presents a problem though when both config is set, and a `DATABASE_URL` is present. Currently the `DATABASE_URL` should "win" and none of the values in `database.yml` are used. This is somewhat unexpected to me if I were to set values such as `pool` in the `production:` group of `database.yml` they are ignored. There are many ways that active record initiates a connection today: - Stand Alone (without rails) - `rake db:<tasks>` - ActiveRecord.establish_connection - With Rails - `rake db:<tasks>` - `rails <server> | <console>` - `rails dbconsole` We should make all of these behave exactly the same way. The best way to do this is to put all of this logic in one place so it is guaranteed to be used. Here is my prosed matrix of how this behavior should work: ``` No database.yml No DATABASE_URL => Error ``` ``` database.yml present No DATABASE_URL => Use database.yml configuration ``` ``` No database.yml DATABASE_URL present => use DATABASE_URL configuration ``` ``` database.yml present DATABASE_URL present => Merged into `url` sub key. If both specify `url` sub key, the `database.yml` `url` sub key "wins". If other paramaters `adapter` or `database` are specified in YAML, they are discarded as the `url` sub key "wins". ``` ### Implementation Current implementation uses `ActiveRecord::Base.configurations` to resolve and merge all connection information before returning. This is achieved through a utility class: `ActiveRecord::ConnectionHandling::MergeAndResolveDefaultUrlConfig`. To understand the exact behavior of this class, it is best to review the behavior in activerecord/test/cases/connection_adapters/connection_handler_test.rb though it should match the above proposal.
-
- 08 1月, 2014 1 次提交
-
-
由 Damien Mathieu 提交于
Closes #13625
-