Schema Definition plugin

Plugin details

A Ruby on Rails plugin for easy migration generation. Based on Auto-Migrations by PJ Hyet

Repositoryhttp://schema-definition.googlecode.com/svn/tags/stable/schema-definition/ Author Pavel Vasev Tags Migrations LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install http://schema-definition.googlecode.com/svn/tags/stable/schema-definition/

== Usage

Create a copy of your schema.rb file and name it definition.rb. Now, when you need to change database schema, edit definition.rb file. Then, invoke

  $ ruby/script generate migration 



It will generate a new migration with all differencies of definition.rb against your current database schema! You can migrate immediately, or add some more tweaks to your migration, or something else.

Why is it great? Because you don't need to remember all that syntax like change_column, add_column, etc - you just modify your schema (in file definition.rb).

Nice bonus: migrations are automatically named (of course you may override name suggested).

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: Guest, about 1 month ago