- 22 5月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
The only type that has a scale is decimal. There's a special case where decimal columns with 0 scale are type cast to integers if the scale is not specified. Appears to only affect schema dumping.
-
- 21 5月, 2014 17 次提交
-
-
由 Rafael Mendonça França 提交于
This reverts commit 9a1abedc, reversing changes made to c72d6c91. Conflicts: activerecord/CHANGELOG.md activerecord/test/models/comment.rb This change break integration with activerecord-deprecated_finders so I'm reverting until we find a way to make it work with this gem.
-
由 Sean Griffin 提交于
-
由 Yves Senn 提交于
-
由 Yves Senn 提交于
- `extract_precision`, `extract_limit`, and `extract_default` probably need to follow. - would be good to remove the delegation `Column#extract_scale`. /cc @sgrif
-
由 Yves Senn 提交于
- Added assertions about the column. Specifically scale. - Move record insertion from setup into test method.
-
由 Lauro Caetano 提交于
The foreign_key could be `String` and just doing `owners_map[owner_key]` could return `nil`. To prevent this bug, we should `to_s` both keys if their types are different. Fixes #14734.
-
由 Rafael Mendonça França 提交于
This reverts commit e94e6c27. Conflicts: activerecord/CHANGELOG.md The original commit was reverted only to be safe since #14407 were reported. We don't have any proof we added a regression with the original commit so reverting it now will give us more problem. Closes #14407
-
由 Sean Griffin 提交于
-
由 Brock Trappitt 提交于
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
-
由 Aaron Patterson 提交于
-
由 Sean Griffin 提交于
All subclasses of column were now delegating `type_cast` to their injected type object. We can remove the overriding methods, and generalize it on the `Column` class itself. This also enabled us to remove several column classes completely, as they no longer had any meaningful behavior of their own.
-
由 Sean Griffin 提交于
-
- 20 5月, 2014 8 次提交
-
-
由 Sean Griffin 提交于
Using general types where possible. Several more can go away once infinity gets figured out.
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
-
由 Eric Chahin 提交于
Fixes #14824.
-
由 Yves Senn 提交于
While running Sqlite3 memory tests I encountered the following error: ``` Finished in 69.416366s, 58.0267 runs/s, 162.3681 assertions/s. 1) Error: ActiveRecord::Migration::ChangeSchemaTest#test_add_column_with_timestamp_type: NoMethodError: undefined method `type' for nil:NilClass /Users/senny/Projects/rails/activerecord/test/cases/migration/change_schema_test.rb:244:in `test_add_column_with_timestamp_type' 4028 runs, 11271 assertions, 0 failures, 1 errors, 1 skips ``` This was because the table `testings` was used in multiple test-cases. This resulted in a wrongly cached schema on `ActiveRecord::Base.schema_chae`. /cc @zuhao
-
由 Yves Senn 提交于
Closes #15122 Closes #15107
-
由 Sean Griffin 提交于
The `:timestamp` type for columns is unused. All database adapters treat them as the same database type. All code in `ActiveRecord` which changes its behavior based on the column's type acts the same in both cases. However, when the type is passed to code that checks for the `:datetime` type, but not `:timestamp` (such as XML serialization), the result is unexpected behavior. Existing schema definitions will continue to work, and the `timestamp` type is transparently aliased to `datetime`.
-
由 Rafael Mendonça França 提交于
-
- 19 5月, 2014 4 次提交
-
-
由 Sean Griffin 提交于
The decision to wrap type registrations in a proc was made for two reasons. 1. Some cases need to make an additional decision based on the type (e.g. a `Decimal` with a 0 scale) 2. Aliased types are automatically updated if they type they point to is updated later. If a user or another adapter decides to change the object used for `decimal` columns, `numeric`, and `number` will automatically point to the new type, without having to track what types are aliased explicitly. Everything else here should be pretty straightforward. PostgreSQL ranges had to change slightly, since the `simplified_type` method is gone.
-
由 Yves Senn 提交于
-
由 Yves Senn 提交于
-
- 18 5月, 2014 7 次提交
-
-
由 eileencodes 提交于
When delete or destroy is called on all records nothing is deleted or destroyed. Intead of running through the code and still not deleteing anything, we should early return
-
由 Marc Schütz 提交于
-
由 Sean Griffin 提交于
Part of #15134. In order to perform typecasting polymorphically, we need to add another argument to the constructor. The order was chosen to match the `oid_type` on `PostgreSQLColumn`.
-
由 Sean Griffin 提交于
Minor refactoring of looping behavior for aggregation
-
由 Sean Griffin 提交于
The current behavior is that they are treated as `datetime` normally, but if they are part of an array, they are treated as `timestamp`. The only place that seems to be impacted by this is schema dumping, which shouldn't matter since `t.datetime` and `t.timestamp` are equivalent in the `PostgreSQL` adapter, anyway.
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
-
- 17 5月, 2014 3 次提交
-
-
由 Vijay Dev 提交于
-
由 Leandro Facchinetti 提交于
-
由 Jason Normore 提交于
Add support for counter name to be passed as parameter on `CounterCache::ClassMethods#reset_counters`. This is to be consistent with the other methods in the module that all accept counter name.
-