aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/schema_dumper.rb
diff options
context:
space:
mode:
authorEdouard CHIN <edouard.chin@shopify.com>2018-01-16 15:45:18 -0500
committerEdouard CHIN <edouard.chin@shopify.com>2018-01-17 15:03:22 -0500
commit84206ad38750840431ea0cbc490177ad61b11bfc (patch)
tree8933fc72ed8d3febb5a031d117b5f1b843f38251 /activerecord/lib/active_record/schema_dumper.rb
parent07563036b0b5c5ddf5b1a31473aa2a2b32b608f5 (diff)
downloadrails-84206ad38750840431ea0cbc490177ad61b11bfc.tar.gz
rails-84206ad38750840431ea0cbc490177ad61b11bfc.tar.bz2
rails-84206ad38750840431ea0cbc490177ad61b11bfc.zip
Added a test around `NO_AUTO_VALUE_ON_ZERO`:
- The mysql `NO_AUTO_VALUE_ON_ZERO` mode should be disabled when inserting fixtures in bulk, this PR adds a test to make sure we don't remove it by mistake - If we live this mode enabled, a statement like this wouldn't work and a `Duplicate entry '0' for key 'PRIMARY'` error will be raised. That's because `DEFAULT` on auto_increment will return 0 ```sql INSERT INTO `aircraft` (`id`, `name`, `wheels_count`) VALUES (DEFAULT, 'first', 2), (DEFAULT, 'second', 3) ```
Diffstat (limited to 'activerecord/lib/active_record/schema_dumper.rb')
0 files changed, 0 insertions, 0 deletions