| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
SQL doesn't have a string type, and interpreting 'string' as text is
contrary to at least SQLite3's behavior:
"Note that a declared type of 'STRING' has an affinity of NUMERIC, not TEXT."
http://www.sqlite.org/datatype3.html
|
| | | |
| | | |
| | | |
| | | | |
In order that set attribute should not be bang method
|
|\ \ \ \
| | | | |
| | | | | |
drop extra variable
|
| |/ / / |
|
|/ / / |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Set field encoding to client_encoding for mysql adapter.
|
| | | | |
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Remove conditional, results are always an instance of `ActiveRecord::Result`
|
| | | |
| | | |
| | | |
| | | | |
`ActiveRecord::Result`
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This change was breaking the Railties tests. See
https://travis-ci.org/rails/rails/jobs/9865969
|
|\ \ \ \
| | | | |
| | | | | |
Free result_metadata directly instead of freeing 2nd, redundant call.
|
| | | | |
| | | | |
| | | | | |
`result_metadata` returns a new object each time it is called, so calling `result_metadata.free` is essentially a noop. Instead call `free` directly on the metadata when we're done with it.
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
If the `db/` directory is not present on a remote machine it will blow up in unexpected ways with error messages that do not indicate there is a missing directory:
```
SQLite3::CantOpenException: unable to open database file
```
This PR checks to see if a directory exists for the sqlite3 file and if not creates it for you.
This PR is an alternative to #11692 as suggested by @josevalim
|
|\ \ \ \
| | | | |
| | | | | |
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.
|