openstreetmap-website/db/migrate/20120328090602_drop_session_table.rb
Tom Hughes ac7bb003ec Cleanup migrations
Cleanup our migrations, replacing as much of our custom code
and monkey patching with modern standard rails methods.
2015-01-11 12:53:01 +00:00

17 lines
420 B
Ruby

require 'migrate'
class DropSessionTable < ActiveRecord::Migration
def up
drop_table "sessions"
end
def down
create_table "sessions" do |t|
t.column "session_id", :string
t.column "data", :text
t.column "created_at", :timestamp
t.column "updated_at", :timestamp
end
add_index "sessions", ["session_id"], :name => "sessions_session_id_idx", :unique => true
end
end