| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Define enable_extension method to prevent undefined method error
|
| |
| |
| |
| |
| |
| |
| | |
When mixing postgresql and another adapter like sqlite3 (for dev and test
respectively), the task `db:test:prepare` will fail due to the `enable_extension`
method not being defined in the abstract adapter. This patch simply adds an
empty definition to prevent it.
|
| |
| |
| |
| | |
Closes: #11706
|
| |
| |
| |
| |
| | |
* Constantize parse token
* Remove extra param passed to `parse_data`
|
| | |
|
| |
| |
| |
| |
| |
| | |
The select_all method always returns ActiveRecord::Result instance,
and the ActiveRecord::Result includes Enumerable mixin.
If #empty?, #first method returns nil. Thus we can simplify this method.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes #11497
As `ActiveRecord::ConnectionAdapters::ConnectionManagement` middleware does not rescue from Exception (but only from StandardError),
the Connection Pool quickly runs out of connections when multiple erroneous Requests come in right after each other.
Recueing from all exceptions and not just StandardError, fixes this behaviour.
|
| |
| |
| |
| |
| | |
This reverts commit cb1d07e43926bcec95cb8b4a663ca9889173395a, reversing
changes made to 754a373e301d2df0b12a11083405252722bc8366.
|
| |
| |
| |
| | |
ActiveRecord::ConnectionAdapters::QueryCache module.
|
| |
| |
| |
| |
| | |
Using the mysql2 adapter, boolean values were sometimes being incorrectly cast
to 't' or 'f'. This changes the cast to match the mysql adapter behavior, ie 1 and 0.
|
|/ |
|
|\
| |
| | |
Stop sending column info to `substitute_at` as it doesn't get utilized.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
in favor of `begin_transaction`
with `:joinable` option.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
frodsan/remove_deprecated_clear_stale_cached_connections_method
Remove AR::Connection#clear_stale_cached_connections! deprecated method
|
| |/ |
|
|/ |
|
| |
|
|\
| |
| | |
Handle single quotes in PostgreSQL default column values
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
PostgreSQL escapes single quotes by using an additional single quote.
When Rails queries the column information, PostgreSQL returns the
default values with the escaped single quotes.
#extract_value_from_default now converts these to one single quote each.
Fixes #10881.
|
| | |
|
|\ \
| |/
|/|
| |
| | |
ranjaykrishna/push_add_column_options_to_schema_creation
Push add column options to schema creation
|
| |
| |
| |
| |
| |
| |
| |
| | |
removed two instances of add_column_options! from abstract_mysql_adapter
reworked rename_column_sql to remove add_column_options from schema_statements
changed to use new hash syntax.
|
| |
| |
| |
| |
| |
| | |
When then PostgreSQL visitor was [added](https://github.com/rails/rails/commit/6b7fdf3bf3675a14eae74acc5241089308153a34)
`add_column` was no longer receiving the column options directly. This
caused the options to be lost along the way.
|
| |
| |
| |
| |
| |
| | |
because this was deprecated.
Some testcases is failed, so I replaced nil to empty hash in add_reference.
|
|\ \
| | |
| | | |
Support array as root element in Postgresql JSON columns
|
| | | |
|
| | | |
|
|/ /
| |
| |
| | |
since 9.1.
|
| |
| |
| |
| |
| |
| | |
Deprecate SchemaStatements#distinct, and make SchemaStatements#columns_for_distinct nodoc.
Conflicts:
activerecord/CHANGELOG.md
|
| |
| |
| |
| | |
Don't modify args in TableDefinition#primary_key
|
| |
| |
| |
| | |
used at all on non-postgres adapters.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The combination of a :uniq => true association and the #distinct call
in #construct_limited_ids_condition combine to create invalid SQL, because
we're explicitly selecting DISTINCT, and also sending #distinct on to AREL,
via the relation#distinct_value.
Rather than build a select distinct clause in #construct_limited_ids_condition,
I set #distinct! and pass just the columns into the select statement.
This requires introducing a #columns_for_distinct method to return the
select columns but not the statement itself.
|
| |
| |
| |
| |
| |
| |
| | |
patricksrobertson/bigserial_id_not_identifying_pk"
This reverts commit 3043d45eefc3776d5f3a9e7d212a01f99d869ef8, reversing
changes made to ca0275d36b395631725c4583db5a45c06443fdb9.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| |
| |
| |
| | |
It is new in PostgreSQL-9.2 .
|
| |
| |
| |
| | |
Introduced in 09ac1776abc0d3482f491f2d49f47bcb3d9a4ad7.
|
| |
| |
| |
| | |
without this, it's not possible to use UUID primary keys without uuid-ossp installed and activated
|
| | |
|