Skip to content

Instantly share code, notes, and snippets.

@richdownie
Created April 21, 2010 15:36
Show Gist options
  • Save richdownie/373973 to your computer and use it in GitHub Desktop.
Save richdownie/373973 to your computer and use it in GitHub Desktop.
class CreateSessions < ActiveRecord::Migration
def self.up
create_table :sessions do |t|
t.string :session_id, :null => false
t.text :data
t.timestamps
end
add_index :sessions, :session_id
add_index :sessions, :updated_at
end
def self.down
drop_table :sessions
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment