- 07 5月, 2016 1 次提交
-
-
由 Arthur Neves 提交于
-
- 06 5月, 2016 2 次提交
-
-
由 Arthur Neves 提交于
-
由 Arthur Neves 提交于
-
- 18 4月, 2016 1 次提交
-
-
由 bogdanvlviv 提交于
-
- 25 3月, 2016 1 次提交
-
-
由 Chris Arcand 提交于
Without clearing the caches afterward, removals done in migrations would not be reflected in a separate task in the same process. That is, given a table with a migration to remove a column, the schema cache would still reflect that a table has that in something such as the 'db:seed' task: `rake db:migrate db:seed` (A common thing to do in a script for a project ala `bin/setup`) vs `rake db:migrate && rake db:seed` (Two processes) The first would not reflect that the column was removed. The second would (cache reset).
-
- 15 3月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
This reverts a334425c. The main reason is that now the workflow is inconsistent when using spring. When using spring `RAILS_ENV` is always set, so only one database is created. This means that in development `bin/rake db:create` and `bundle exec rake db:create` have different results. It also breaks the `bin/setup` script since `bin/rake db:setup db:test:prepare` will fail.
-
- 06 3月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Follow up to #22543.
-
- 24 2月, 2016 1 次提交
-
-
由 Aaron Patterson 提交于
creating all databases mutates the connection pool. This patch restores the connection pool to the connection spec established before creating all databases. Fixes #23279
-
- 09 1月, 2016 2 次提交
-
-
由 yuuji.yaginuma 提交于
The error message has become a `DISABLE_DATABASE_ENVIRONMENT_CHECK`, modified to match the error message. ref: https://github.com/rails/rails/blob/master/activerecord/lib/active_record/migration.rb#L161
-
由 schneems 提交于
-
- 08 1月, 2016 3 次提交
-
-
由 schneems 提交于
Discussion: https://github.com/rails/rails/pull/22967#discussion_r49137035
-
由 schneems 提交于
Raise an error when a destructive action is made on a database where the current environment is different from the environment stored in the database.
-
由 schneems 提交于
This PR introduces a key/value type store to Active Record that can be used for storing internal values. It is an alternative implementation to #21237 cc @sgrif @matthewd. It is possible to run your tests against your production database by accident right now. While infrequently, but as an anecdotal data point, Heroku receives a non-trivial number of requests for a database restore due to this happening. In these cases the loss can be large. To prevent against running tests against production we can store the "environment" version that was used when migrating the database in a new internal table. Before executing tests we can see if the database is a listed in `protected_environments` and abort. There is a manual escape valve to force this check from happening with environment variable `DISABLE_DATABASE_ENVIRONMENT_CHECK=1`.
-
- 18 12月, 2015 1 次提交
-
-
由 David Heinemeier Hansson 提交于
Still more to do. Please assist!
-
- 17 12月, 2015 1 次提交
-
-
由 Abdelkader Boudih 提交于
-
- 20 11月, 2015 1 次提交
-
-
由 Nick Muerdter 提交于
If postgresql is being used and there are multiple schemas listed on the `schema_search_path`, then `structure.sql` dumps (triggered by `rake db:structure:dump` or `config.active_record.schema_format = :sql`) began failing in Rails 4.2.5. This is due to the changes made in https://github.com/rails/rails/pull/17885 The problem is that multiple schemas were getting getting passed to `Kernel.system` as a single, space delimited string argument (for example, "--schema=foo --schema=bar"). However, with the updated array style of calling `Kernel.system`, these need to be passed as separate arguments (for example, "--schema=foo", "--schema=bar"). If they get passed as a single string, then the underlying pg_dump program isn't sure how to interpret that single argument and you'll get an error reporting: "pg_dump: No matching schemas were found"
-
- 02 11月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
This reverts commit f6ca7e4e. The default collation of utf8 in MySQL is the `utf8_general_ci`, and this should not be changed. This is because, the better collation in the all locales is not exists, optimal collation in own application is not known other than themselves. The `utf8_unicode_ci` is known as Japanese killer in Japan, there are serious impacts in search of Japanese. MySQL implements the `utf8_unicode_ci` according to the Unicode Collation Algorithm (UCA) described at http://www.unicode.org/reports/tr10/, but the `utf8_unicode_ci` have only partial support for the UCA, only primary level key comparison implemented (also known as L1 (Base characters) comparison). Because L1 (Base characters) comparison does not distinguish between the presence or absence of the accent, if distinction of the accent is important there is a serious impact (e.g. Japanese). Example: ``` > SHOW CREATE TABLE `dicts`\G *************************** 1. row *************************** Table: dicts Create Table: CREATE TABLE `dicts` ( `word` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `meaning` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci 1 row in set (0.00 sec) > INSERT INTO `dicts` VALUES ('ハハ', 'mother'), ('パパ', 'father'); Query OK, 2 rows affected (0.00 sec) > SELECT * FROM `dicts` WHERE `word` = 'ハハ'; +--------+---------+ | word | meaning | +--------+---------+ | ハハ | mother | | パパ | father | +--------+---------+ 2 rows in set (0.00 sec) > CREATE UNIQUE INDEX `unique_index_word` ON `dicts`(`word`); ERROR 1062 (23000): Duplicate entry 'ハハ' for key 'unique_index_word' ``` We should omit the collation entirely rather than providing a default. Then the choice is the responsibility of the server and MySQL distribution.
-
- 21 10月, 2015 3 次提交
-
-
由 Jay Hayes 提交于
* If the drop task fails for a reason other than the database not existing, processing should end. This is indicated by a non-zero exit status. * Since the backtrace is already printed to screen, we forgo printing it again by using an explicit call to `exit`. *
⚠ This modifies the behavior of the db:create task slightly in that the stack trace is no longer printed by default. If the `--trace` option is used, it will print the trace _after_ the error message. -
由 Jay Hayes 提交于
* If the create task fails for a reason other than the database already existing, processing should end. This is indicated by a non-zero exit status. * Since the backtrace is already printed to screen, we forgo printing it again by using an explicit call to `exit`. *
⚠ This modifies the behavior of the db:create task slightly in that the stack trace is no longer printed by default. If the `--trace` option is used, it will print the trace _after_ the error message. -
由 Jay Hayes 提交于
* Previously the sqlite3 adapter could not "fail" on drop. Now an error is raised when no file exists. * Also updates purge to be resilient of drop failures. This is how purge is expected to behave.
-
- 14 10月, 2015 2 次提交
-
-
由 Yves Senn 提交于
The focus of this change is to make the API more accessible. References to method and classes should be linked to make it easy to navigate around. This patch makes exzessiv use of `rdoc-ref:` to provide more readable docs. This makes it possible to document `ActiveRecord::Base#save` even though the method is within a separate module `ActiveRecord::Persistence`. The goal here is to bring the API closer to the actual code that you would write. This commit only deals with Active Record. The other gems will be updated accordingly but in different commits. The pass through Active Record is not completely finished yet. A follow up commit will change the spots I haven't yet had the time to update. /cc @fxn
-
由 Yves Senn 提交于
-
- 11 10月, 2015 1 次提交
-
-
由 Paul Sadauskas 提交于
-
- 19 9月, 2015 1 次提交
-
-
由 Steve Mitchell 提交于
-
- 09 9月, 2015 1 次提交
-
-
由 Rafael Mendonça França 提交于
Usage was removed in 5c449553
-
- 07 9月, 2015 1 次提交
-
-
由 Tobias Bielohlawek 提交于
-
- 02 8月, 2015 1 次提交
-
-
由 starbelly 提交于
- Added run_cmd() class method to dry up Kernel.system() messages within this namespace and avoid shell expansion by passing a list of arguments instead of a string - Update structure_dump, structure_load, and related tests units to pass a list of params instead of using a string to avoid shell expansion
-
- 12 7月, 2015 1 次提交
-
-
由 David Rodríguez 提交于
The `error` method is not defined, in general, for exceptions. Instead, print the exception message. This error was hiding actual meaningful DB configuration errors. See http://stackoverflow.com/questions/18774463.
-
- 23 5月, 2015 1 次提交
-
-
由 Jonathan Worek 提交于
-
- 13 5月, 2015 1 次提交
-
-
由 Alex Coomans 提交于
Add full set of MySQL CLI options to support SSL authentication when using db:structure dump and load
-
- 25 3月, 2015 1 次提交
-
-
由 Jason Weathered 提交于
-
- 18 3月, 2015 1 次提交
-
-
由 Ryan Wallace 提交于
Fixes db:structure:dump when using schema_search_path and PostgreSQL extensions. Closes #17157.
-
- 04 3月, 2015 1 次提交
-
-
由 James Cox 提交于
-
- 24 12月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
This isn't Seattle.rb, @senny. ;)
-
- 23 12月, 2014 1 次提交
-
-
由 Yves Senn 提交于
-
- 18 12月, 2014 1 次提交
-
-
由 Yves Senn 提交于
Closes #17945 `db:test:prepare` still purges the database to always keep the test database in a consistent state. This patch introduces new problems with `db:schema:load`. Prior to the introduction of foreign-keys, we could run this file against a non-empty database. Since every `create_table` containted the `force: true` option, this would recreate tables when loading the schema. However with foreign-keys in place, `force: true` wont work anymore and the task will crash. /cc @schneems
-
- 05 11月, 2014 1 次提交
-
-
由 Paul Annesley 提交于
-
- 01 11月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
-
- 29 10月, 2014 1 次提交
-
-
由 Xavier Noria 提交于
The current style for warning messages without newlines uses concatenation of string literals with manual trailing spaces where needed. Heredocs have better readability, and with `squish` we can still produce a single line. This is a similar use case to the one that motivated defining `strip_heredoc`, heredocs are super clean.
-
- 04 9月, 2014 1 次提交
-
-
由 Yves Senn 提交于
[Joshua Cody & Yves Senn] Closes #16757. Prior to this patch schema loading rake tasks had the potential to leak a connection to a different database. This had side-effects when rake tasks operating on the current connection (like `db:seed`) were chained.
-