- 18 8月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
As of MySQL 5.7.8, MySQL supports a native JSON data type. Example: create_table :json_data_type do |t| t.json :settings end
-
- 11 6月, 2015 1 次提交
-
-
由 Yves Senn 提交于
-
- 11 3月, 2015 1 次提交
-
-
由 palkan 提交于
-
- 03 3月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 18 2月, 2015 1 次提交
-
-
由 Sean Griffin 提交于
-
- 12 2月, 2015 1 次提交
-
-
由 Yves Senn 提交于
Also removed some cruft in the `setup` and `teardown` methods.
-
- 08 2月, 2015 1 次提交
-
-
由 Sean Griffin 提交于
This predicate is only used in `query_attribute`, and is relatively easy to remove without adding a bunch of is a checks.
-
- 03 2月, 2015 1 次提交
-
-
由 Vipul A M 提交于
-
- 31 1月, 2015 1 次提交
-
-
由 Sean Griffin 提交于
Remaining are `limit`, `precision`, `scale`, and `type` (the symbol version). These will remain on the column, since they mirror the options to the `column` method in the schema definition DSL
-
- 22 1月, 2015 1 次提交
-
-
由 Sean Griffin 提交于
Keeping with our behavior elsewhere in the system, invalid input is assumed to be `nil`. Fixes #18629.
-
- 19 1月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
`.` is regexp meta character. It should be escape for `assert_match` correctly.
-
- 04 1月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
Slightly refactoring `PostgreSQLColumn`. `array` should be readonly. `default_function` should be initialized by `super`. `sql_type` has been removed `[]`. Since we already choose to remove it we should not change.
-
- 06 11月, 2014 1 次提交
-
-
由 Yves Senn 提交于
-
- 05 11月, 2014 1 次提交
-
-
由 Ted O'Meara 提交于
-
- 25 7月, 2014 1 次提交
-
-
由 Philippe Creux 提交于
[Philippe Creux, Chris Teague]
-
- 07 7月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
This was only used for uniqueness validations. The first usage was in conjunction with `limit`. Types which cast to string, but are not considered text cannot have a limit. The second case was only with an explicit `:case_sensitive => true` option given by the user.
-
- 30 6月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
-
- 26 6月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
We have several test cases on "tricky" types that are essentially testing that `update_all` goes through the same type casting behavior as a normal assignment + save. We recently had another case to add this test for another type in https://github.com/rails/rails/pull/12742. Rather than testing this separately for every type which is "tricky" when round tripping, let's instead have a fairly exhaustive test that ensures we're getting the correct values at every step for `update_all`. Given the structure of the code now, we can be confident that if the type is correct, and `update_all` is type casting correctly, we're going to get the right behavior for all types.
-
- 18 6月, 2014 2 次提交
-
-
由 Sean Griffin 提交于
If we want to have type decorators mess with the attribute, but not the column, we need to stop type casting on the column. Where possible, we changed the tests to test the value of `column_defaults`, which is public API. `Column#default` is not.
-
由 Sean Griffin 提交于
HStore columns come back from the database separated by a comma and a space, not just a comma. We need to mirror that behavior since we compare the two values. Also adds a regression test against JSON to ensure we don't have the same bug there.
-
- 14 6月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
We have several mutable types on Active Record now. (Serialized, JSON, HStore). We need to be able to detect if these have been modified in place.
-
- 10 6月, 2014 2 次提交
-
-
由 Sean Griffin 提交于
In some cases there is a difference between the two, we should always be doing one or the other. For convenience, `type_cast` is still a private method on type, so new types that do not need different behavior don't need to implement two methods, but it has been moved to private so it cannot be used accidentally.
-
由 Sean Griffin 提交于
- The following is now true for all types, all the time - `model.attribute_before_type_cast == given_value` - `model.attribute == model.save_and_reload.attribute` - `model.attribute == model.dup.attribute` - `model.attribute == YAML.load(YAML.dump(model)).attribute` - Removes the remaining types implementing `type_cast_for_write` - Simplifies the implementation of time zone aware attributes - Brings tz aware attributes closer to being implemented as an attribute decorator - Adds additional point of control for custom types
-
- 04 6月, 2014 2 次提交
-
-
由 Sean Griffin 提交于
`@raw_attributes` should not contain the type-cast, mutable version of the value.
-
由 Yves Senn 提交于
Revert "test pg, remove unused column assignments. Follow up to 254cdf47" Related to #15492 This reverts commit 254cdf47. This reverts commit 4bcf9029. There are public methods that assume `Column#default` is type casted. The return value of `Column#default` is publicly relevant and should not change. /cc @sgrif
-
- 03 6月, 2014 2 次提交
- 28 5月, 2014 1 次提交
-
-
由 Yves Senn 提交于
The solution presented in this patch is not efficient. We should replace it in the near future. The following needs to be worked out: * Is `@attributes` storing the Ruby or SQL representation? * `cacheable_column?` is broken but `hstore` and `json` rely on that behavior Refs #15369. /cc @sgrif @rafaelfranca
-
- 12 5月, 2014 1 次提交
-
-
由 Yves Senn 提交于
-
- 28 3月, 2014 2 次提交
- 15 3月, 2014 1 次提交
-
-
由 Guo Xiang Tan 提交于
Follow-Up to https://github.com/rails/rails/pull/14348 Ensure that SQLCounter.clear_log is called after each test. This is a step to prevent side effects when running tests. This will allow us to run them in random order.
-
- 16 1月, 2014 1 次提交
-
-
由 Yves Senn 提交于
-
- 24 12月, 2013 2 次提交
-
-
由 Carlos Antonio da Silva 提交于
Always pass in the column for quote_bound_value and quote using it in case it exists there.
-
由 Tadas Tamosauskas 提交于
Fixes #12261. Closes #12395. Conflicts: activerecord/CHANGELOG.md activerecord/test/cases/adapters/postgresql/array_test.rb activerecord/test/cases/adapters/postgresql/json_test.rb
-
- 25 10月, 2013 2 次提交
-
-
由 Severin Schoepke 提交于
See also commit 5ac2341f
-
由 Yves Senn 提交于
-
- 02 7月, 2013 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 14 5月, 2013 1 次提交
-
-
由 Alexey Noskov 提交于
-
- 28 2月, 2013 1 次提交
-
-
由 Yves Senn 提交于
Closes #9480. We use `TableDefinition` for `#create_table` and `Table` for `#change_table`. The PostgreSQL sepcifc types were only defined on `TableDefinition` so I also added them to `Table`.
-