README.markdown in standalone_migrations-1.0.2 vs README.markdown in standalone_migrations-1.0.3
- old
+ new
@@ -1,6 +1,6 @@
-Rails migrations in non-Rails (and non Ruby) projects.
+Rails migrations in non-Rails (and non Ruby) projects.
WHAT'S NEW
==========
In the 1.0 release we have moved to using Rails 3 migrations instead of maintaining our own migration related code. Just about anything you can do with Rails 3 migrations you can now do with [Standalone Migrations](https://github.com/thuss/standalone-migrations) too! This removed 95% of the code we have to maintain. Big thanks to [Michael Grosser](http://pragmatig.wordpress.com) for undertaking this major rewrite!
@@ -68,11 +68,11 @@
The general form is:
rake db:generate model="model_name" fields="type:column_name0 type:column_name1 ... type:column_namen"
You can have as many fields as you would like.
-
+
An example to create a Person table with 3 columns (and it will automatically add the t.timestamps line)
rake db:generate model="Person" fields="string:first_name string:last_name integer:age"
This will create a migration in db/migrate/
@@ -80,11 +80,11 @@
class CreatePerson < ActiveRecord::Migration
def self.up
create_table :Person do |t|
t.string :first_name
t.string :last_name
- t.integer :age
+ t.integer :age
t.timestamps
end
end
def self.down
@@ -106,27 +106,46 @@
rake db:migrate RAILS_ENV=test
### To execute a specific up/down of one single migration
rake db:migrate:up VERSION=20081220234130
-
+
### To revert your last migration
rake db:rollback
### To revert your last 3 migrations
- rake db:rollback STEP=3
+ rake db:rollback STEP=3
+### Custom configuration
+
+By default, Standalone Migrations will assume there exists a "db/"
+directory in your project. But if for some reason you need a specific
+directory structure to work with, you can use a configuration file
+named .standalone_migrations in the root of your project containing
+the following:
+
+ db:
+ seeds: db/seeds.rb
+ migrate: db/migrate
+ schema: db/schema.rb
+ config:
+ database: db/config.yml
+
+These are the configurable options available. You can omit any of
+the keys and Standalone Migrations will assume the default values.
+
Contributors
============
- [Todd Huss](http://gabrito.com/)
- [Two Bit Labs](http://twobitlabs.com/)
- [Michael Grosser](http://pragmatig.wordpress.com)
- [Eric Lindvall](http://bitmonkey.net)
- [Steve Hodgkiss](http://stevehodgkiss.com/)
- [Rich Meyers](https://github.com/richmeyers)
- [Wes Bailey](http://exposinggotchas.blogspot.com/)
- [Robert J. Berger](http://blog.ibd.com/)
- - [Federico Builes](http://mheroin.com)
+ - [Federico Builes](http://mheroin.com/)
+ - [Ricardo Valeriano](http://ricardovaleriano.com/)
This work is originally based on [Lincoln Stoll's blog post](http://lstoll.net/2008/04/stand-alone-activerecord-migrations/) and [David Welton's post](http://journal.dedasys.com/2007/01/28/using-migrations-outside-of-rails).