Permalink
Browse files

fixed docs

  • Loading branch information...
1 parent 5b6dd23 commit cec4db81d0b0a998d9e93b0f8bf2def0045e165e @tj committed Dec 3, 2011
Showing with 20 additions and 20 deletions.
  1. +20 −20 Readme.md
View
@@ -76,37 +76,37 @@ The second creates `./migrations/001-add-owners.js`, which we can populate:
When first running the migrations, all will be executed in sequence.
- $ migrate
- up : migrations/000-add-pets.js
- up : migrations/001-add-jane.js
- up : migrations/002-add-owners.js
- up : migrations/003-coolest-pet.js
- migration : complete
+ $ migrate
+ up : migrations/000-add-pets.js
+ up : migrations/001-add-jane.js
+ up : migrations/002-add-owners.js
+ up : migrations/003-coolest-pet.js
+ migration : complete
Subsequent attempts will simply output "complete", as they have already been executed in this machine. `node-migrate` knows this because it stores the current state in `./migrations/.migrate` which is typically a file that SCMs like GIT should ignore.
- $ migrate
- migration : complete
+ $ migrate
+ migration : complete
If we were to create another migration using `migrate create`, and then execute migrations again, we would execute only those not previously executed:
- $ migrate
- up : migrates/004-coolest-owner.js
+ $ migrate
+ up : migrates/004-coolest-owner.js
You can also run migrations incrementally by specifying a migration.
- $ migrate up 002-coolest-pet.js
- up : migrations/000-add-pets.js
- up : migrations/001-add-jane.js
- up : migrations/002-add-owners.js
- migration : complete
+ $ migrate up 002-coolest-pet.js
+ up : migrations/000-add-pets.js
+ up : migrations/001-add-jane.js
+ up : migrations/002-add-owners.js
+ migration : complete
This will run up-migrations upto (and including) `002-coolest-pet.js`. Similarly you can run down-migrations upto (and including) a specific migration, instead of migrating all the way down.
-
- $ migrate down 001-add-jane.js
- down : migrations/002-add-owners.js
- down : migrations/001-add-jane.js
- migration : complete
+
+ $ migrate down 001-add-jane.js
+ down : migrations/002-add-owners.js
+ down : migrations/001-add-jane.js
+ migration : complete
## License

0 comments on commit cec4db8

Please sign in to comment.