pjhyett / auto_migrations
- Source
- Commits
- Network (11)
- Issues (1)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
Zhang Yuanyi (author)
Fri Oct 09 06:56:17 -0700 2009
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | Sat Mar 15 17:44:02 -0700 2008 | |
| |
README | Mon Apr 20 17:19:37 -0700 2009 | |
| |
Rakefile | Sat Mar 15 17:44:02 -0700 2008 | |
| |
init.rb | Sat Mar 15 17:44:02 -0700 2008 | |
| |
lib/ | Fri Oct 09 16:09:16 -0700 2009 | |
| |
tasks/ | Mon Feb 16 12:06:40 -0800 2009 | |
| |
test/ | Sat Mar 15 17:44:02 -0700 2008 |
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 ]
