Unschema - rebase your schema.rb
Splits your schema.rb into separate migrations per table.
Every table migration contains a create_table and additional add_index calls.
We use it to cleanup older projects, that gets reused as codebase for new projects.
Add this line to your application's Gemfile:
gem 'unschema', '~> 0.2.0'
And then execute:
Or install it yourself as:
$ gem install unschema
usage: unschema [SCHEMA_FILE] [MIGRATIONS_DIR] [RAILS_VERSION]
- Auto-detect Rails directory and use correct defaults.
- Generate prettier migrations (ident, options hashes, newlines)
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request
Follow these steps to release this gem:
# Bump version in edit lib/unschema/version.rb edit README.md git commit -m "Release X.Y.Z" rake release