Skip to content

Instantly share code, notes, and snippets.

@neaf
Created March 15, 2009 17:40
Show Gist options
  • Save neaf/79488 to your computer and use it in GitHub Desktop.
Save neaf/79488 to your computer and use it in GitHub Desktop.
# For details on Sequel migrations see
# http://sequel.rubyforge.org/
# http://sequel.rubyforge.org/rdoc/classes/Sequel/Database.html#M000607
class UserMigration < Sequel::Migration
def up
create_table :users do
primary_key :id
string :email, :null => false, :unique => true
string :username, :null => false, :unique => true
string :crypted_password, :null => false, :size => 41
string :salt, :null => false, :size => 41
datetime :created_at
string :name
end
end
def down
drop_table :users
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment