Repository is archived
No commit activity in last 3 years
No release in over 3 years
Auto database migration for Rails 4.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

AutoMigrations¶ ↑

Forget migrations, auto-migrate!

Usage¶ ↑

Write out your schema (or use an existing one)

$ cat db/schema.rb

ActiveRecord::Schema.define do

  create_table :posts do |t|
    t.string   :title
    t.text     :body
    t.timestamps
  end

end

$ rake db:auto:migrate

Created posts table

…a few days later

$ cat db/schema.rb

ActiveRecord::Schema.define do

  create_table :posts do |t|
    t.string   :title
    t.text     :content
    t.timestamps
  end

end

$ rake db:auto:migrate
-- add_column("posts", :content, :text)
   -> 0.0307s
-- remove_column("posts", "body")
   -> 0.0311s
  • PJ Hyett [ pjhyett@gmail.com ]