- 22 5月, 2018 1 次提交
-
-
由 Yasuo Honda 提交于
Unlike other databases, changing SQLite3 table definitions need to create a temporary table. While changing table operations, the original table needs dropped which caused `SQLite3::ConstraintException: FOREIGN KEY constraint failed` if the table is referenced by foreign keys. This pull request disables foreign keys by `disable_referential_integrity`. Also `disable_referential_integrity` method needs to execute `defer_foreign_keys = ON` to defer re-enabling foreign keys until the transaction is committed. https://www.sqlite.org/pragma.html#pragma_defer_foreign_keys Fixes #31988 - This `defer_foreign_keys = ON` has been supported since SQLite 3.8.0 https://www.sqlite.org/releaselog/3_8_0.html and Rails 6 requires SQLite 3.8 #32923 now - <Models>.reset_column_information added to address `ActiveModel::UnknownAttributeError` ``` Error: ActiveRecord::Migration::ForeignKeyChangeColumnTest#test_change_column_of_parent_table: ActiveModel::UnknownAttributeError: unknown attribute 'name' for ActiveRecord::Migration::ForeignKeyChangeColumnTest::Post. ```
-
- 21 5月, 2018 4 次提交
-
-
由 Ryuta Kamizono 提交于
Bump minimum SQLite version to 3.8
-
由 Ryuta Kamizono 提交于
To prevent redundant `to_s` like https://github.com/rails/rails/pull/32923#discussion_r189460008 automatically in the future.
-
由 Yasuo Honda 提交于
These OS versions have SQLite 3.8 or higher by default. - macOS 10.10 (Yosemite) or higher - Ubuntu 14.04 LTS or higher Raising the minimum version of SQLite 3.8 introduces these changes: - All of bundled adapters support `supports_multi_insert?` - SQLite 3.8 always satisifies `supports_foreign_keys_in_create?` and `supports_partial_index?` - sqlite adapter can support `alter_table` method for foreign key referenced tables by #32865 - Deprecated `supports_multi_insert?` method
-
由 Ryuta Kamizono 提交于
So do not expose `PostgreSQLTypeMetadata` in the doc too.
-
- 20 5月, 2018 1 次提交
-
-
由 yuuji.yaginuma 提交于
Follow up of #32418.
-
- 19 5月, 2018 6 次提交
-
-
由 Ryuta Kamizono 提交于
-
由 Ryuta Kamizono 提交于
Finalize transaction record state after real transaction
-
由 Eugene Kenny 提交于
After a real (non-savepoint) transaction has committed or rolled back, the original persistence-related state for all records modified in that transaction is discarded or restored, respectively. When the model has transactional callbacks, this happens synchronously in the `committed!` or `rolled_back!` methods; otherwise, it happens lazily the next time the record's persistence-related state is accessed. The synchronous code path always finalizes the state of the record, but the lazy code path only pops one "level" from the transaction counter, assuming it will always reach zero immediately after a real transaction. As the test cases included here demonstrate, that isn't always the case. By using the same logic as the synchronous code path, we ensure that the record's state is always updated after a real transaction has finished.
-
由 Rafael França 提交于
Don't generate yarn's contents in `app:update` task if it's skipped
-
由 Rafael França 提交于
Fix documentation for ActionController::Params#fetch
-
由 Rafael Mendonça França 提交于
Fixes #32928.
-
- 18 5月, 2018 6 次提交
-
-
由 Linus Marton 提交于
Make it clear that the return value is converted to an instance of ActionController::Parameters if possible
-
由 George Claghorn 提交于
-
由 Rafael França 提交于
Generate ActiveStorage attachment getter and setter methods in mixin
-
由 Rafael Mendonça França 提交于
-
由 Josh Susser 提交于
Generated attachment getter and setter methods are created within the model's `GeneratedAssociationMethods` module to allow overriding and composition using `super`. Includes tests for new functionality. Co-authored-by: NJosh Susser <josh@hasmanythrough.com> Co-authored-by: NJamon Douglas <terrildouglas@gmail.com>
-
由 Rafael França 提交于
Fix user_input_in_time_zone to coerce non valid string into nil
-
- 17 5月, 2018 10 次提交
-
-
由 Ryuta Kamizono 提交于
-
由 Ryuta Kamizono 提交于
Active storage: Image variant options not correct in docs [ci skip]
-
由 lucfranken 提交于
### Steps to reproduce Using Rails 5.2.0 When following this example: http://api.rubyonrails.org/classes/ActiveStorage/Variant.html `avatar.variant(resize: "100x100", monochrome: true, flip: "-90")` ### Expected behavior Image should be rendered as flipped. ### Actual behavior I get an error: > failed with error: gm mogrify: Unrecognized option (-90). ### Fix: According to: https://github.com/minimagick/minimagick the option should be called rotate: `avatar.variant(resize: "100x100", monochrome: true, rotate: "-90")` So **flip** changed to **rotate**. ### System configuration **Rails version**: 5.2.0 **Ruby version**: ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
-
由 Ryuta Kamizono 提交于
-
由 George Claghorn 提交于
-
由 George Claghorn 提交于
-
由 George Claghorn 提交于
-
由 George Claghorn 提交于
[David Robertson & George Claghorn]
-
由 Annie-Claude Côté 提交于
Before it was coercing an invalid string into "2000-01-01 00:00:00".
-
由 Annie-Claude Côté 提交于
Inside user_input_in_time_zone we call in_time_zone on the value and value can be a String.
-
- 16 5月, 2018 2 次提交
-
-
由 Tsukuru Tanimichi 提交于
-
由 Ryuta Kamizono 提交于
Originally `SingularAssociation#replace` abstract method is private, and doesn't intend to be called directly.
-
- 15 5月, 2018 3 次提交
-
-
由 Ryuta Kamizono 提交于
Follow up of #19171 and #26825.
-
由 Ryuta Kamizono 提交于
Add math test
-
由 Nikolai B 提交于
After #449 was merged math can be done on these nodes, adding a test file to unit test all the math operators.
-
- 14 5月, 2018 1 次提交
-
-
由 Yuji Yaginuma 提交于
Don't generate `config/spring.rb` in `app:update` task when spring isn't loaded
-
- 13 5月, 2018 6 次提交
-
-
由 Tsukuru Tanimichi 提交于
-
由 George Claghorn 提交于
Add available transformations to docs
-
由 wata_mac 提交于
`foreign_key`, `json` and `virtual` are also available.
-
由 Ryuta Kamizono 提交于
Follow up of #32605.
-
由 Ryuta Kamizono 提交于
Remove ActiveRecord::Transactions#rollback_active_record_state!
-
由 Ryuta Kamizono 提交于
Don't clear transaction state after manual rollback
-