| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Before this patch `Infinity`, `-Infinity` and `Nan` were read as `0`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In #10410 it was noted that you can no longer create PK's with the
type of bigserial in PostgreSQL in 4.0.0.rc1. This is mostly
because the newer adapter is checking for column type with the
id column instead of just letting it pass through like it did
before.
Side effects:
You may just create a PK column of a type that you really don't
want to be your PK. As far as I can tell this was allowed in 3.2.X
and perhaps an exception should be raised if you try and do
something extremely dumb.
|
|
|
|
|
|
|
| |
Closes #15024.
These operations happen before instances are created.
The current behavior is misleading and can result in broken behavior.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rollback"
We are reverting these commits, because there are other caveats related
to dirty attributes not being restored when a transaction is rollback.
For instance, nested transactions cannot proper restore the dirty
attributes state after a rollback.
At the moment, the dirty attributes are scoped by the transaction.
When we call `.save` on a record, the dirty attributes will be reset even
if the transaction gets rollback.
[related #13166]
[related #15018]
[related #15016]
[closes #15019]
This reverts commits
* bab48f0a3d53a08bc23ea0887219e8deb963c3d9
* b0fa7cf3ff8432cc2eef3682b34763b7f8c93cc8.
* 73fb39b6faa9de593ae75ad4e3b8e065ea0e53af
* 37c238927fbed059de3f26a90d8923fb377568a5.
* 8d8d4f1560264cd1c74364d67fa0501f6dd2c4fa
Revert "Merge pull request #13166 from bogdan/transaction-magic"
|
|
|
|
|
| |
HABTM should fall back to using the normal CollectionAssociation's size calculation if the collection is not cached or loaded.
This addresses both #14913 and #14914 for master.
|
|
|
|
| |
Closes #14989
|
|
|
|
| |
[related #13166]
|
|
|
|
|
| |
This makes table_name_suffix work the same as table_name_prefix when
using namespaced models. Pretty much the same as 67d1cec.
|
| |
|
|
|
|
|
|
|
|
| |
This is a regression 4.0 -> 4.1 fix.
In 4.1.0 Relation#join is delegated to Arel#SelectManager.
In 4.0 series it is delegated to Array#join
This patch puts back the behaviour of 4.0
|
|\
| |
| |
| |
| |
| |
| | |
Fix exception when logging SQL w/ nil binary value.
Conflicts:
activerecord/CHANGELOG.md
|
| | |
|
|\ \
| |/
|/|
| | |
Fixed custom validation context bug for child associations
|
| |
| |
| |
| |
| |
| |
| |
| | |
associations were not being saved.
Fixes #13854.
[Eric Chahin, Aaron Nelson, & Kevin Casey]
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Symbolize variables of mysql/mysql2 connection configuration
Conflicts:
activerecord/CHANGELOG.md
|
| |/
| |
| |
| |
| |
| |
| | |
For mysql2/mysql adapters, `sql_mode` variable name set in `database.yml`
as string, was ignored and `sql_mode` was set to use strict mode.
Fixes #14895
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
SQLite3: Always close statements.
Conflicts:
activerecord/CHANGELOG.md
|
| | |
| | |
| | |
| | |
| | |
| | | |
SQLite3 adapter must make sure to close statements after queries.
Fixes: #13631
|
| |/
|/| |
|
| |
| |
| |
| |
| |
| | |
When used a custom join_table name on a habtm, rails was not saving it
on Reflections. This causes a problem when rails loads fixtures, because
it uses the reflections to set database with fixtures.
|
| |
| |
| |
| | |
/cc @tenderlove
|
| |
| |
| |
| |
| |
| |
| | |
The PG Adapter should use `:datetime` consistently instead of mapping
mispellings to `:timestamp`.
See #14513
|
| |
| |
| |
| |
| |
| | |
transactions.
Closes #14841.
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Properly handle scoping with has_many :through. Fixes #14537.
Conflicts:
activerecord/CHANGELOG.md
activerecord/test/cases/associations/has_many_through_associations_test.rb
|
| | |
| | |
| | |
| | | |
details).
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Also add a Changelog entry
[related #9702]
[fixes #8928]
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
properly return an empty hash instead of zero. Fixes issue #14721
Conflicts:
activerecord/CHANGELOG.md
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Closes #14222.
This is a follow up to #6104
This does not have the backwards compatibility issues brought up in
implementation to break.
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
laurocaetano/equality_between_relation_and_collection_proxy
The comparison between `Relation` and `CollectionProxy` should be consistent.
Conflicts:
activerecord/CHANGELOG.md
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Example:
author.posts == Post.where(author_id: author.id)
# => true
Post.where(author_id: author.id) == author.posts
# => true
Fixes #13506
|
|/ / / |
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | | |
swoker/activerecord_fix_aggregate_methods_with_select
Activerecord fix aggregate methods with select
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
[Yves Senn & Matthew Draper]
|
| | | |
| | | |
| | | |
| | | | |
[Yves Senn & Matthew Draper]
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Fix insertion of records for hmt association with scope
Conflicts:
activerecord/CHANGELOG.md
|
| | | | | |
|
|\ \ \ \ \
| | |/ / /
| |/| | |
| | | | |
| | | | |
| | | | | |
Conflicts:
activerecord/CHANGELOG.md
activesupport/CHANGELOG.md
|
| | | | | |
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
PostgreSQL, remove varchar limit.
Conflicts:
activerecord/CHANGELOG.md
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
& Yves Senn]
There is no reason for the PG adapter to have a default limit of 255 on :string
columns. See this snippet from the PG docs:
Tip: There is no performance difference among these three types, apart
from increased storage space when using the blank-padded type, and a
few extra CPU cycles to check the length when storing into a
length-constrained column. While character(n) has performance
advantages in some other database systems, there is no such advantage
in PostgreSQL; in fact character(n) is usually the slowest of the
three because of its additional storage costs. In most situations text
or character varying should be used instead.
|
| | | | | | |
|
| |\ \ \ \ \
| | |/ / / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
CollectionProxy uses the arel of its association's scope.
Conflicts:
activerecord/CHANGELOG.md
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
CollectionProxy should be able to reuse the behavior (methods) of its parent class,
but with its own state. This change allows CollectionProxy to use the arel object
corresponding to its association's scope.
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Auto-generate stable fixture UUIDs on PostgreSQL
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/fixtures.rb
activerecord/test/cases/adapters/postgresql/uuid_test.rb
activesupport/CHANGELOG.md
|