Ruby on Rails
SchemaQuickstart (Version #2)

The purpose of this page is to get you started with schema.rb. I found that there wasn’t much documentation about it and I was starting a new app, so now you all get to play along with me.

This tutorial assumes that you are creating a brand new application. If you are attempting to migrate from .sql files to schema.rb, it’s likely as simple as running rake db_schema_dump.

Create and set up your new app

  1. rails yourapp
  2. Edit yourapp/config/database.yml to match your database configuration

Generate an empty schema.rb

Run rake db_schema_dump from your app’s directory

Define your schema

TODO

The purpose of this page is to get you started with schema.rb. I found that there wasn’t much documentation about it and I was starting a new app, so now you all get to play along with me.

This tutorial assumes that you are creating a brand new application. If you are attempting to migrate from .sql files to schema.rb, it’s likely as simple as running rake db_schema_dump.

Create and set up your new app

  1. rails yourapp
  2. Edit yourapp/config/database.yml to match your database configuration

Generate an empty schema.rb

Run rake db_schema_dump from your app’s directory

Define your schema

TODO