Plugins - Sexy Migrations
Add to favoritesLet’s turn this:
class UpdateYourFamily < ActiveRecord::Migration
create_table :updates do |t|
t.column :user_id, :integer
t.column :group_id, :integer
t.column :body, :text
t.column :type, :string
t.column :created_at, :datetime
t.column :updated_at, :datetime
end
def self.down
drop_table :updates
end
end
Into this:
class UpdateYourFamily < ActiveRecord::Migration
create_table :updates do
foreign_key :user
foreign_key :group
text :body
string :type
timestamps!
end
def self.down
drop_table :updates
end
end
Using this:
SVN:
$ ./script/plugin install svn://errtheblog.com/svn/plugins/sexy_migrations
Piston:
$ piston import svn://errtheblog.com/svn/plugins/sexy_migrations vendor/plugins/sexy_migrations
