| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This reverts commit 026d0555685087845b74dd87a0417b5a164b1c13.
Conflicts:
activerecord/lib/active_record/fixtures.rb
Fixes #13383
|
|
|
|
|
|
|
|
|
| |
- Earlier, change_table was creating database-agnostic object.
- After this change, it will create correct object based on current
database adapter.
- This will ensure that create_table and change_table will get same objects.
- This makes update_table_definition method public and nodoc.
- Fixes #13577 and #13503
|
|
|
|
|
| |
Need to check if valud also respond_to :id before calling it, otherwise
things could explode.
|
|\ |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
also override drop_table in AbstractMySQLAdapter to properly drop
temporary tables without committing the transaction
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Closes #13146.
This fixes an error when using:
```
change_colum :table, :column, :bigint, array: true
```
|
| |
| |
| |
| |
| |
| | |
already have cache true.
This commit takes into account the last cache_enabled value, before clearing query_cache.
|
| |
| |
| |
| | |
deprecated already.
|
|/
|
|
|
|
|
|
|
|
|
| |
This prevents the following error when a MySQL index on a foreign key
column is renamed:
```
ActiveRecord::StatementInvalid: Mysql2::Error: Cannot drop index 'index_engines_on_car_id': needed in a foreign key constraint: DROP INDEX `index_engines_on_car_id` ON `engines`
```
refs: #13038.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
When the adapter is with prepared statement disabled and the binds array
is not empty the connection adapter will try to set the binds values and
will fail. Now we are checking if the adapter has the prepared statement
disabled.
Fixes #12023
|
|
|
|
|
|
| |
This reverts commit 71ff7d9c6592b93e2c810a1f464943dd7bd02c7f.
Reason: I need to check with @jeremy if we can do this.
|
|
|
|
|
|
|
| |
The visitor have to consume the bind parameters to make the statements
work when the prepared statement option is disabled.
Fixes #12023
|
|\
| |
| | |
Remove extra case.
|
| | |
|
|/ |
|
| |
|
|\
| |
| | |
Remove conditional, results are always an instance of `ActiveRecord::Result`
|
| |
| |
| |
| | |
`ActiveRecord::Result`
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
| |
ActiveRecord::ConnectionAdapters::QueryCache module.
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
Deprecate SchemaStatements#distinct, and make SchemaStatements#columns_for_distinct nodoc.
Conflicts:
activerecord/CHANGELOG.md
|
| |
| |
| |
| | |
Don't modify args in TableDefinition#primary_key
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
once
This way the available options are only built for actually fetching the
algorithm in case the option is given.
The options are going to be necessary a second time only in case the option
is given but does not exist, which is supposed to be due to a typo or
something like that, so no problem.
|
| | |
|
| | |
|
|/ |
|
| |
|
|\
| |
| | |
respect auto_increment in rename_column for mysql
|
| | |
|
| | |
|