| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
The times would be equivalent, even if they were in different time
zones. E.g. 12:00 UTC == 5:00 PDT
|
|
|
|
| |
Millisecond inequality causes failures on Travis
|
| |
|
|
|
|
|
|
|
| |
This adds a regression test for #14411, which was fixed by #15503.
Closes #14411
Closes #14595
|
|\
| |
| | |
Bring type casting behavior of hstore/json in line with serialized
|
| |
| |
| |
| |
| | |
`@raw_attributes` should not contain the type-cast, mutable version of
the value.
|
|/
|
|
| |
BC era year is (astronomical year + 1) and starts from 1 BC.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Revert "test pg, remove unused column assignments. Follow up to 254cdf47"
Related to #15492
This reverts commit 254cdf4728291277f3fbaa854f34495030e476b4.
This reverts commit 4bcf9029452e0c760af04faab6b549710401e8cf.
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
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
That data is internal to Active Record. What we care about is that
new records have the right default value.
|
| |
|
|
|
|
| |
/cc @sgrif
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Nearly completely implemented in terms of custom properties.
`_before_type_cast` now stores the raw serialized string consistently,
which removes the need to keep track of "state". The following is now
consistently true:
- `model.serialized == model.reload.serialized`
- A model can be dumped and loaded infinitely without changing
- A model can be saved and reloaded infinitely without changing
|
|
|
|
|
| |
This is an intermediate solution. It is related to the refactoring @sgrif
is making and will change in the future.
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
Fixed #columns_for_distinct of postgresql adapter
Conflicts:
activerecord/CHANGELOG.md
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Move types to the top level `ActiveRecord` namespace
|
| | |
| | |
| | |
| | |
| | | |
`ActiveRecord::ConnectionAdapters::Type::Value` =>
`ActiveRecord::Type::Value`
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| | |
| | | |
Add an interface for type objects to control Ruby => SQL
|
| | |
| | |
| | |
| | |
| | | |
Adds the ability to save custom types, which type cast to non-primitive
ruby objects.
|
|/ /
| |
| |
| | |
`warning: assigned but unused variable - album`
|
|\ \
| | |
| | | |
Use the generic type map for all PG type registrations
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We're going to want all of the benefits of the type map object for
registrations, including block registration and real aliasing. Moves
type name registrations to the adapter, and aliases the OIDs to the
named types
|
| | | |
|
| | | |
|
| | | |
|
|/ / |
|
| | |
|
| |
| |
| |
| |
| | |
- Added assertions about the column. Specifically scale.
- Move record insertion from setup into test method.
|
| | |
|
| |
| |
| |
| |
| | |
Using general types where possible. Several more can go away once
infinity gets figured out.
|
| |
| |
| |
| | |
Fixes #14824.
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
jcxplorer/fix-enable_extension-with-table_name_prefix
Fix migrations that use enable_extension with table_name_prefix/suffix
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/migration.rb
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When using ActiveRecord::Base.table_name_prefix and/or
table_name_suffix, extension names got the same treatment as table names
when running migrations. This led to migrations that tried to call, for
example, enable_extension("prefix_hstore") on the connection.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | | |
Partial revert of c0bfc3f412834ffe8327a15ae3a46602cc28e425
|
|\ \ \
| | | |
| | | |
| | | | |
[postgres] remove (outer) sub-class declarations with nested modules/classes
|
| | | |
| | | |
| | | |
| | | | |
redundant
|