ericgoodwin / gitty-migrations
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
7c6e495
gitty-migrations / README
| aed5f8fc » | ericgoodwin | 2008-03-05 | 1 | GittyMigrations | |
| 0a0c428d » | ericgoodwin | 2008-03-03 | 2 | =============== | |
| 3 | |||||
| 4 | Requires a extended 'rubygit' gem that has stashes | ||||
| 0fdf502e » | ericgoodwin | 2008-03-30 | 5 | cd vendor/plugins/gitty_migrations/extended_rubygit_gem | |
| 0a0c428d » | ericgoodwin | 2008-03-03 | 6 | sudo gem install git-1.0.5 | |
| 7 | |||||
| 8 | Example | ||||
| 9 | ======= | ||||
| 10 | |||||
| 11 | class MyMigration < ActiveRecord::Migration | ||||
| 12 | |||||
| 7c6e495f » | ericgoodwin | 2008-03-31 | 13 | # Will rollback to the commit that this file was checked in on | |
| 14 | use_git | ||||
| 15 | |||||
| 16 | # Will rollback to a certain commit that you define | ||||
| 17 | # use_git :revision => "2024589c214b41c8b29bcd6444c2d49807760a5a" | ||||
| 0a0c428d » | ericgoodwin | 2008-03-03 | 18 | ||
| 19 | def self.up | ||||
| 20 | puts "This is a test migration" | ||||
| 21 | end | ||||
| 22 | |||||
| 23 | def self.down | ||||
| 24 | |||||
| 25 | end | ||||
| 26 | |||||
| 27 | end | ||||
| 28 | |||||
| 29 | TODO | ||||
| 30 | =============== | ||||
| 31 | |||||
| d645f8d4 » | ericgoodwin | 2008-03-29 | 32 | √ Check for the revision where the migration was checked in or last edited and | |
| 0a0c428d » | ericgoodwin | 2008-03-03 | 33 | automatically use that revision if no revision has been specified | |
| 2c5c82b0 » | ericgoodwin | 2008-03-05 | 34 | * If there are no stashes then clear the stash when we are done with the migrations | |
| 0a0c428d » | ericgoodwin | 2008-03-03 | 35 | ||
| 36 | |||||
| 37 | Copyright (c) 2008 Eric Goodwin, released under the MIT license | ||||
