| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| |
| | |
add a Table#name accessor like TableDefinition#name
|
| | |
|
|\ \
| |/
|/| |
remove never called method `limited_update_conditions`
|
| | |
|
|\ \
| | |
| | | |
Tiny improvement in sqlite3 adapter
|
| |/
| |
| |
| |
| | |
- remove unused method `supports_add_column?`
- change additional restriction method to `valid_alter_table_type?`
- fix code style
|
|\ \
| | |
| | | |
Fix bug found when running individual tests against #17217 after merging
|
| |/ |
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| | |
Empact/association-bind-values-not-updated-on-save
Fix that a collection proxy could be cached before the save of the owner, resulting in an invalid proxy lacking the owner’s id
Conflicts:
activerecord/CHANGELOG.md
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
resulting in an invalid proxy lacking the owner’s id.
Absent this fix calls like: owner.association.update_all to behave unexpectedly because they try to act on association objects where
owner_id is null.
more evidence here: https://gist.github.com/Empact/5865555
```
Active Record 3.2.13
-- create_table(:firms, {:force=>true})
-> 0.1371s
-- create_table(:clients, {:force=>true})
-> 0.0005s
1 clients. 1 expected.
1 clients updated. 1 expected.
```
```
Active Record 4.0.0
-- create_table(:firms, {:force=>true})
-> 0.1606s
-- create_table(:clients, {:force=>true})
-> 0.0004s
1 clients. 1 expected.
0 clients updated. 1 expected.
```
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Why are people assigning booleans to string columns? >_>
We unintentionally changed the behavior on Sqlite3 and PostgreSQL.
Boolean values should cast to the database's representation of true and
false. This is 't' and 'f' by default, and "1" and "0" on Mysql. The
implementation to make the connection adapter specific behavior is hacky
at best, and should be re-visted once we decide how we actually want to
separate the concerns related to things that should change based on the
database adapter.
That said, this isn't something I'd expect to change based on my
database adapter. We're storing a string, so the way the database
represents a boolean should be irrelevant. It also seems strange for us
to give booleans special behavior at all in string columns. Why is
`to_s` not sufficient? It's inconsistent and confusing. Perhaps we
should consider deprecating in the future.
Fixes #17571
|
| | |
|
| |
| |
| |
| | |
fixes #17495
|
| |
| |
| |
| |
| |
| | |
if you specify a default scope on a model, it will break caching. We
cannot predict what will happen inside the scope, so play it safe for
now. fixes #17495
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | | |
Print out a meaningful error when ActiveRecord::ReadOnlyRecord is raised
|
|/ /
| |
| |
| |
| |
| |
| | |
Currently, there is no messages which get printed out. Convoluted system
may have hooks that create other objects in which case we only fail with
no messages. This commit changes this information allowing you to know
which object is the one that actually raised the error.
|
| | |
|
| |
| |
| |
| |
| | |
This makes debugging the generated schema output much easier.
As a side effect it also shaves off 2.5 seconds of test runtime.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
We introduced a performance hit by adding an additional iteration
through a model's attributes on creation. We don't actually need the
values from `Result` to be a hash, we can separate the columns and
values and zip them up ourself during the iteration that we have to do.
|
|\ \
| | |
| | |
| | | |
copy reflection_scopes’s unscoped value when building scope for preloading
|
| | |
| | |
| | |
| | | |
preloading, fixes #11036
|
|\ \ \
| | | |
| | | | |
rake db:create shows underlying error message.
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
Remove unused duplicated method `add_column_position` from AbstractMysqlAdapter.
|
| | | |
| | | |
| | | |
| | | | |
AbstractMysqlAdapter
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Avoid unnecessary allocations and method calls
|
| | | | | |
|
| | | | | |
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
db:fixtures:load"
This reverts commit 482fdad5ef8a73688b50bba3991dd4ef6f286edd.
Fixes #17237.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
We should not behave differently just because a class has a default
scope.
|
| | | |
| | | |
| | | |
| | | | |
This method is still used by `update_all`
|
| | | |
| | | |
| | | |
| | | |
| | | | |
These appear to be implementation relics of times past. They duplicate
the logic in Relation, and are no longer used internally.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Arel specifically handles `SelectManager`, with the same logic we're
currently performing. The AST is `Enumerable`, which Arel looks for
separately now.
|
|\ \ \ \
| | | | |
| | | | | |
Call gsub with a Regexp instead of a String for better performance
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We support this behavior, but have no tests which assert that type
casting actually occurs.
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | | |
We need to re-order the bind parameters since the AST returned by the
relation will have the where statement as the first bp, which breaks on
PG.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
MySQL reports the column name as `"MAX(developer_id)"`. PG will report
it as `"max"`
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
It was transitively relying on the vertex model being loaded
|