Created
March 8, 2015 00:29
-
-
Save darwinrc/22fe79cad5091e74d250 to your computer and use it in GitHub Desktop.
Migration Lotus and Sequel
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 CreatePosts < Sequel::Migration | |
def up | |
create_table :posts do | |
primary_key :id | |
String :title | |
String :content | |
Integer :user_id | |
index :user_id | |
end | |
end | |
def down | |
drop_table :posts | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment