Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Generate migration sql for Rails apps and Sequel
Ruby
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
.gitignore
Gemfile
LICENSE
README.md
Rakefile
migration_sql.gemspec

README.md

Description

Generates the sql equivalent of db/migrate into db/migration_sql. Currently only works for Rails apps and Sequel.

Installation

If using bundler, add this line to your application's Gemfile:

gem 'migration_sql'

Or install it yourself with:

$ gem install migration_sql

Usage

To dump your migration sql, use this rake task:

$ rake db:dump_migration_sql
Saved sql for 20120605163256_add_some_column.rb
...

The rake task runs on your test environment and assumes db:drop and db:create for dropping and creating your database. Additional db create tasks can be configured with MigrationSql.db_create_tasks. The rake task can be run multiple times and will only create sql files that don't already exist.

TODO

License

MIT. See LICENSE for more.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
Something went wrong with that request. Please try again.