| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This reverts commit babc24c1b07c1fd58b9b3249b0256f9b0d45c0f0.
Conflicts:
activerecord/test/cases/adapters/mysql/connection_test.rb
activerecord/test/cases/adapters/mysql2/connection_test.rb
|
|
|
|
| |
by using shorter attribute names.
|
|\
| |
| | |
Dump PostgreSQL primary key with custom function as a default.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For example, if use pgcrypto extension in PostgreSQL 9.4 beta 1, where
uuid-ossp extension isn't available for moment of writing, and thus to
use a gen_random_uuid() method as a primary key default.
In this case schema dumper wasn't able to correctly reconstruct
create_table statement and lost primary key constraint on schema load.
Fixes #16111.
|
| | |
|
|\ \
| | |
| | | |
Don't rely on the column SQL type for bit string quoting
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Use a type object for type casting behavior on SQLite3
|
| | | |
|
| |/
|/|
| |
| |
| | |
Also reordered some of the items to put newer ones on top (same order as
CHANGELOGs), which makes it easier to diff while we are still working on it.
|
| |
| |
| |
| | |
The changelog entry for #14899 was missing.
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
zuhao/refactor_activerecord_nested_through_associations_test
Warm up cache to prevent assertion failure.
|
| | | |
|
|\ \ \
| | | |
| | | | |
Remove PG's definition of `type_cast`
|
| |/ /
| | |
| | |
| | |
| | | |
All cases except for `nil` in an array have been removed. `nil` in an
array is handled by the Array type object.
|
|\ \ \
| | | |
| | | | |
Don't rely on the sql type to quote XML columns in PG
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
Avoid retrieving connection in ActiveRecord::QueryCache multiple times.
|
| |/ / |
|
|/ /
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
adapter, fixed from #16057 [ci skip]
|
|\ \
| | |
| | | |
[ci skip] /sqlite/i --> SQLite
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit a03097759bd7103bb9db253e7ba095f011453f75.
This needs more work before it would work correctly on master.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixed issue with ActiveRecord serialize object as JSON
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/attribute_methods/serialization.rb
|
|\ \ \
| | | |
| | | | |
If our connection is explicitly non-strict, tell MySQL
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We default to making the connection strict, but have historically relied
on the MySQL default when we want it to be non-strict. On some (recent?)
versions of MySQL, new connections default to being strict, so if we've
been told 'strict:false', we're obliged to pass that on.
This fixes a test failure that we've seen turn up on relatively-new
development machines, so we do already have a test covering it.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
One of the author fixture we have ("david") references an author address by ID.
Since we disable FK checks when inserting fixtures, this is all fine until we
try to update it, at which point MySQL would complain about the missing row
referenced by the `author_address_id`.
[Godfrey Chan, Matthew Draper]
|
| | | |
| | | |
| | | |
| | | | |
This reverts commit e84799d, e31104c and e6ca8e2
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In addition to defining the association, a `required` association will
also have its presence validated.
Before:
```ruby
belongs_to :account
validates_presence_of :account
```
After:
```ruby
belongs_to :account, required: true
```
This helps to draw a distinction between types of validations, since
validations on associations are generally for data integrity purposes,
and aren't usually set through form inputs.
|
|/ / / |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Use a type object for type casting behavior on SQLite3
|
| | |/
| |/|
| | |
| | |
| | | |
Note: I'm not sure we actually need to be logging when this happens.
This code would be a fair bit cleaner if we didn't need to log it.
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
cade/fix_counter_cache_count_with_association_selects
Add `:all` argument to `count` in `reset_counters`
Conflicts:
activerecord/CHANGELOG.md
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Prior to this fix, if an association had a scope with a `select`,
calls to `reset_counters` would generate invalid SQL and throw:
ActiveRecord::StatementInvalid: [$DB_ADAPTER]: wrong number of
arguments to function COUNT()
References #10710, #13648
|
|\ \ \ \
| | | | |
| | | | | |
After find-via-reload, the record is not new
|
| | |_|/
| |/| | |
|
|\ \ \ \
| |/ / /
|/| | | |
Remove unneccessary special case for money in quoting
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Do not rely on the column type when quoting infinity
|
| |/ / / |
|
|/ / / |
|
|/ / |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Move pk initialization logic onto `AttributeSet`
Conflicts:
activerecord/lib/active_record/attribute_set.rb
|
| | |
| | |
| | |
| | | |
Better encapsulates its internals from `ActiveRecord::Base`.
|