Created
December 18, 2011 00:52
-
-
Save wjlafrance/1491983 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CreateBookmarksAndUsers < ActiveRecord::Migration | |
def self.up | |
create_table :users do |t| | |
t.string :username | |
t.string :password | |
t.string :email_address | |
t.timestamps | |
end | |
create_table :bookmarks do |t| | |
t.string :name | |
t.string :url | |
t.timestamps | |
end | |
create_table :bookmarks_users, :id => false do |t| | |
t.integer :user_id | |
t.integer :bookmark_id | |
end | |
end | |
def self.down | |
drop_table :users | |
drop_table :bookmarks | |
drop_table :bookmarks_users | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment