Skip to content

Commit

Permalink
eliminated duplication, removed dead link
Browse files Browse the repository at this point in the history
link to "cheatsheet" went to domain squatter page
  • Loading branch information
gilesbowkett committed Feb 19, 2012
1 parent a84bc1c commit 6e3fad0
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions README.markdown
Expand Up @@ -53,8 +53,6 @@ Add database configuration to `db/config.yml` in your projects base directory e.
rake db:new_migration name=FooBarMigration
edit db/migrate/20081220234130_foo_bar_migration.rb

... and fill in the up and down migrations [Cheatsheet](http://dizzy.co.uk/ruby_on_rails/cheatsheets/rails-migrations).

#### If you really want to, you can just execute raw SQL:

```ruby
Expand All @@ -67,31 +65,6 @@ def self.down
end
```

#### Even better, you can use the _new_migration_ task to create the initial migration ####

The general form is:

rake db:new_migration name=foo

This will create a migration in `db/migrate/` named with a timestamp and `foo.rb`, e.g., `db/migrate/201201234_foo.rb`.

```ruby
class CreatePerson < ActiveRecord::Migration
def self.up
create_table :Person do |t|
t.string :first_name
t.string :last_name
t.integer :age
t.timestamps
end
end

def self.down
drop_table :Person
end
end
```

### To apply your newest migration:

rake db:migrate
Expand Down

0 comments on commit 6e3fad0

Please sign in to comment.