1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/lib/active_record
Ryuta Kamizono 4a0e3809be Fix type casting column default in change_column
Since #31230, `change_column` is executed as a bulk statement.

That caused incorrect type casting column default by looking up the
before changed type, not the after changed type.

In a bulk statement, we can't use `change_column_default_for_alter` if
the statement changes the column type.

This fixes the type casting to use the constructed target sql_type.

Fixes #34938.
2019-01-20 11:09:00 +09:00
..
associations Ensure StatementCache#execute never raises RangeError 2019-01-18 16:01:14 +09:00
attribute_methods Merge pull request #30973 from k0kubun/prefer-block-parameter 2018-12-20 17:38:32 +09:00
coders
connection_adapters Fix type casting column default in change_column 2019-01-20 11:09:00 +09:00
database_configurations Refactor migrations_path command option to database 2018-09-28 14:24:36 -04:00
fixture_set Move resolve_sti_reflections which is table row related code into TableRow 2018-11-03 23:39:54 +09:00
locale
locking Fix example for database-specific locking clause 2018-10-30 16:58:57 -04:00
migration Fix type casting column default in change_column 2019-01-20 11:09:00 +09:00
railties Add foreign key to active_storage_attachments for blob_id via new migration 2019-01-16 13:13:23 +00:00
relation activerecord: Fix where nil condition on composed_of attribute 2019-01-18 11:10:10 -05:00
scoping Module#{define_method,alias_method,undef_method,remove_method} become public since Ruby 2.5 2018-12-21 01:39:18 +09:00
tasks Add multi-db support to schema cache dump and clear 2018-11-07 14:11:46 -05:00
type Fix force equality checking not to break the serialized attribute with Array 2018-06-06 19:29:39 +09:00
type_caster
validations Use unboundable? rather than boundable? 2019-01-18 14:56:43 +09:00
aggregations.rb Remove ActiveSupport::Concern from ActiveRecord::Aggregations 2018-06-26 17:26:02 +09:00
association_relation.rb Fix AssociationRelation not to set inverse instance key just like before 2018-10-07 22:42:31 +09:00
associations.rb Refs #28025 nullify *_type column on polymorphic associations on :nu… (#28078) 2019-01-15 23:03:20 +09:00
attribute_assignment.rb Enable Style/RedundantBegin cop to avoid newly adding redundant begin block 2018-12-21 06:12:42 +09:00
attribute_decorators.rb
attribute_methods.rb Fix inspect with non-primary key id attribute 2018-11-06 01:51:52 +00:00
attributes.rb
autosave_association.rb Merge pull request #33378 from numbata/subclass-redefine-autosave-callbacks 2018-09-13 15:50:38 -04:00
base.rb Refactors Active Record connection management 2018-08-30 10:06:45 -04:00
callbacks.rb Updating sample code on ActiveRecord#before_destroy callback [ci skip] 2018-10-31 23:18:27 -07:00
collection_cache_key.rb Fix Collection cache key with limit and custom select (PG:AmbigousColumn: Error) 2018-10-15 20:38:12 -03:00
connection_handling.rb Raise helpful error when role doesn't exist 2018-12-21 11:10:10 -05:00
core.rb Ensure StatementCache#execute never raises RangeError 2019-01-18 16:01:14 +09:00
counter_cache.rb Remove force parent loading when counter cache child is created/destroyed 2018-09-26 23:45:08 +09:00
database_configurations.rb Enable Style/RedundantBegin cop to avoid newly adding redundant begin block 2018-12-21 06:12:42 +09:00
define_callbacks.rb
dynamic_matchers.rb
enum.rb Module#{define_method,alias_method,undef_method,remove_method} become public since Ruby 2.5 2018-12-21 01:39:18 +09:00
errors.rb Rename error that occurs when writing on a read 2018-12-07 08:53:47 -05:00
explain.rb Enable Performance/UnfreezeString cop 2018-09-23 08:56:55 +09:00
explain_registry.rb
explain_subscriber.rb
fixtures.rb Enable Style/RedundantBegin cop to avoid newly adding redundant begin block 2018-12-21 06:12:42 +09:00
gem_version.rb Preparing for 6.0.0.beta1 release 2019-01-18 15:42:12 -05:00
inheritance.rb Add Style/RedundantFreeze to remove redudant .freeze 2018-09-29 07:18:44 +00:00
integration.rb Remove ability to specify a timestamp name for #cache_key 2019-01-17 16:08:32 -05:00
internal_metadata.rb Only define attribute methods from schema cache 2018-09-28 21:16:21 +01:00
legacy_yaml_adapter.rb
log_subscriber.rb Use backtrace cleaner to clean up backtrace for verbose query logs 2018-08-14 09:15:28 +10:00
migration.rb Remove deprecated ActiveRecord::Migrator.migrations_path= 2019-01-17 16:08:32 -05:00
model_schema.rb Make implicit order column configurable 2018-11-26 16:19:52 -08:00
nested_attributes.rb ActiveRecord#respond_to? No longer allocates strings 2018-10-15 15:31:32 -05:00
no_touching.rb Add example for no_touching? in active_record/no_touching for api docs [ci skip] 2018-06-25 21:26:42 -04:00
null_relation.rb
persistence.rb Restore an ability that class level update without giving ids 2019-01-02 06:23:52 +09:00
query_cache.rb Fix query cache for multiple connections 2018-11-20 17:48:48 -05:00
querying.rb Improve ActiveRecord::Querying documentation [ci skip] 2018-11-28 14:50:25 -08:00
railtie.rb Change SQLite3Adapter to always represent boolean values as integers 2019-01-17 16:08:32 -05:00
readonly_attributes.rb
reflection.rb Find inverse associations with plural names 2018-08-27 15:22:37 -04:00
relation.rb Refactor bind_attribute to expand an association to actual attribute 2019-01-11 18:01:55 +09:00
result.rb Make ActiveRecord::Result#to_a as alias to ActiveRecord::Result#to_ary 2018-09-20 12:25:01 +03:00
runtime_registry.rb
sanitization.rb Remove deprecated expand_hash_conditions_for_aggregates 2019-01-17 16:08:32 -05:00
schema.rb Deprecate passing migrations_paths to connection.assume_migrated_upto_version 2018-12-28 09:21:09 +09:00
schema_dumper.rb Update schema.rb documentation [CI SKIP] 2018-04-24 11:18:11 -04:00
schema_migration.rb Only define attribute methods from schema cache 2018-09-28 21:16:21 +01:00
scoping.rb Don't expose current_scope for internal use 2018-09-11 21:41:11 +09:00
secure_token.rb
serialization.rb
statement_cache.rb Ensure StatementCache#execute never raises RangeError 2019-01-18 16:01:14 +09:00
store.rb Update prefix and allow suffix options for store accessors 2018-06-12 07:10:09 -07:00
suppressor.rb
table_metadata.rb
test_databases.rb Convert configs_for to kwargs, add include_replicas 2018-08-31 16:07:09 -04:00
test_fixtures.rb Share the connection pool when there are multiple handlers 2019-01-03 16:32:46 -05:00
timestamp.rb Remove ability to specify a timestamp name for #cache_key 2019-01-17 16:08:32 -05:00
touch_later.rb
transactions.rb Remove ensure from with_transaction_returning_status 2018-11-11 22:35:47 +00:00
translation.rb Add AR::Base.base_class? predicate 2018-04-02 14:34:32 +03:00
type.rb Upgrade Rubocop to 0.61.1 and fix offenses 2018-12-10 19:22:56 -02:00
type_caster.rb
validations.rb
version.rb