rails/activerecord/test/schema
Stefan Kanev 0ed096ddf5 Fix counter_cache for polymorphic associations
Also removes a false positive test that depends on the fixed bug:

At this time, counter_cache does not work with polymorphic relationships
(which is a bug). The test was added to make sure that no
StaleObjectError is raised when the car is destroyed. No such error is
currently raised because the lock version is not incremented by
appending a wheel to the car.

Furthermore, `assert_difference` succeeds because `car.wheels.count`
does not check the counter cache, but the collection size. The test will
fail if it is replaced with `car.wheels_count || 0`.
2015-07-19 15:52:29 -06:00
..
mysql2_specific_schema.rb Add :charset and :collation options support for MySQL string and text columns 2015-03-06 18:56:19 +09:00
mysql_specific_schema.rb Add :charset and :collation options support for MySQL string and text columns 2015-03-06 18:56:19 +09:00
oracle_specific_schema.rb tests, favor public API over inspecting columns where possible. 2014-12-01 16:57:48 +01:00
postgresql_specific_schema.rb Correctly handle array columns with defaults in the schema dumper 2015-06-11 16:50:25 -06:00
schema.rb Fix counter_cache for polymorphic associations 2015-07-19 15:52:29 -06:00
sqlite_specific_schema.rb fk: use random digest names 2014-06-26 22:03:49 +02:00