ActiveRecord::Mysql::Structure
This gem improves ActiveRecord's dumping of MySQL schema to a structure.sql file.
AUTO_INCREMENTvalues will not be written, preventing noisy diffsDROP TABLE IF EXISTSstatements will be prepended toCREATE_TABLEstatements, mimicking theforce: trueoption normally captured inschema.rb- adds newline to EOF
It is intended for use with ActiveRecord 3 only.
The AUTO_INCREMENT functionality is unlikely to ever be added to Rails master as it uses the mysqldump command directly.
As of this writing, mysqldump has no support for ignoring AUTO_INCREMENT output.
Installation
Add this line to your application's Gemfile:
gem 'activerecord-mysql-structure'
And then execute:
$ bundle
Or install it yourself as:
$ gem install activerecord-mysql-structure