Rails plugin for automating migrations
Ruby
Switch branches/tags
Nothing to show
Pull request Compare This branch is 14 commits ahead, 1 commit behind pjhyett:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.document
.gitignore
LICENSE.txt
README.rdoc
Rakefile
VERSION
auto_migrations.gemspec
init.rb

README.rdoc

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 ]