| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |/
|/| |
|
| |
| |
| |
| | |
`strip_heredoc` method is defined on active_support/core_ext/string
|
| |
| |
| |
| |
| |
| |
| |
| | |
seamusabshere/numerify-pool-checkout-timeout-from-urls-4-1-stable
Make sure :checkout_timeout and :dead_connection_timeout are numbers
Conflicts:
activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, Active Record will rescue any errors raised within
after_rollback/after_create callbacks and print them to the
logs. Next versions of rails will not rescue those errors anymore,
and just bubble them up, as the other callbacks.
This adds a opt-in flag to enable that behaviour, of not rescuing
the errors.
Example:
# For not swallow errors in after_commit/after_rollback
config.active_record.errors_in_transactional_callbacks = true
[fixes #13460]
|
|\ \
| | |
| | | |
Change the default `null` value for timestamps
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As per discussion, this changes the model generators to specify
`null: false` for timestamp columns. A warning is now emitted if
`timestamps` is called without a `null` option specified, so we can
safely change the behavior when no option is specified in Rails 5.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
after_commit should not run in nested transactions, however they should
run once the outermost transaction gets committed. This patch fixes the
problem copying the records from the Savepoint to its parent. So the
RealTransaction will have all records that needs to run callbacks on it.
[fixes #16425]
|
| | |
| | |
| | |
| | |
| | |
| | | |
Use `commit_transaction`/`rollback_transaction` on
`within_new_transaction` method, so they make sure they `pop` the
transaction from the stack before calling the methods `commit`/`rollback`.
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
[Yves Senn & Matthew Draper]
The column check was embodied in the defaul index name.
If the :name option was used, the specified columns were not verified at all.
Given:
```
assert connection.index_exists?(table_name, :foo_id, :name => :index_testings_on_yo_momma)
```
That index could have been defined on any field, not necessarily on `:foo_id`.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When Rails starts, tables existence check query is executed
number of models.
In case of mysql,
SHOW TABLES LIKE 'table1';
SHOW TABLES LIKE 'table2';
SHOW TABLES LIKE 'table3';
...
SHOW TABLES LIKE 'table999';
Add process to get the names of all tables by one query.
|
|\ \
| | |
| | | |
Clarify Transaction responsibilities by breaking unneeded inheritance hierarchy.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Transaction class doesnt need to encapsulate the transaction state using
inheritance.
This removes all Transaction subclasses, and let the Transaction object
controls different actions based on its own state. Basically the only
actions would behave differently are `being`,`commit`,`rollback` as they
could act in a savepoint or in a real transaction.
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
The method has been removed in 09206716f8695f6b8467f15c1befa5a4c3c10978
(PR #16074), but the delegation was apparently missed, and one instance
of the method was added back with the addition of OID::Xml in
336be2bdf7dfa1b31879d0ab27e5f3101b351923 (PR #16072), so we can safely
rm both.
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Transactions refactoring - 2
|
| | | |
|
| | | |
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| | |
This makes the implicit description of how connection pooling works a
little more explicit. It converts the examples of a model hierarchy into
actual Ruby code and demonstrates how the key structure of the
database.yml relates to the `establish_connection` method.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This piece of code was introduced on
67d8bb963d5d51fc644d6b1ca20164efb4cee6d7 , which was calling
`committed?` in the `transaction_state` before calling the `committed!`
method. However on 7386ffc781fca07a0c656db49fdb54678caef809, the
`committed?` check was removed and replaced by a `finalized?`, which
only checks if the state is not nil. Thus we can remove that line.
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | | |
Transactions refactoring
|
| | |
| | |
| | |
| | | |
Also add test to assets the savepoint name
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add a transaction manager per connection, so it can controls the
connection responsibilities.
Delegate transaction methods to transaction_manager
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The finishing variable on the transaction object was a work-around for
the savepoint name, so after a rollback/commit the savepoint could be
released with the previous name.
related:
9296e6939bcc786149a07dac334267c4035b623a
60c88e64e26682a954f7c8cd6669d409ffffcc8b
|
|\ \ \
| | | |
| | | | |
[ci skip] Fix documentation of SQLite3Adapter.columns where SQLite3Column was removed in e781aa31fc52a7c696115302ef4d4e02bfd1533b
|
| | | |
| | | |
| | | | |
As of https://github.com/rails/rails/commit/e781aa31fc52a7c696115302ef4d4e02bfd1533b SQLite3Column has been dropped.
|
| |/ /
|/| |
| | |
| | | |
[Philippe Creux, Chris Teague]
|
|\| |
| | |
| | | |
Fixes #16265 and correct documentation typo
|
| | | |
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Closes #16261.
[Matthew Draper, Yves Senn]
Using `DEFAULT NULL` results in the same behavior as `DROP DEFAULT`.
However, PostgreSQL will cast the default to the columns type,
which leaves us with a default like "default NULL::character varying".
/cc @matthewd
|
|\ \
| | |
| | |
| | |
| | |
| | | |
* Allow to specify a type for foreign key column in migrations
* unified the docs
* some cleanup in CHANGELOG
|
|/ /
| |
| |
| | |
[Andrey Novikov & Łukasz Sarnacki]
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Treat invalid uuid as nil
Conflicts:
activerecord/CHANGELOG.md
|
| | | |
|
| | | |
|
|/ / |
|
|\ \
| | |
| | | |
Don't rely on the column SQL type for bit string quoting
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Use a type object for type casting behavior on SQLite3
|
| | | |
|
|\ \ \
| | | |
| | | | |
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
|