Drop the sessions table
authorTom Hughes <tom@compton.nu>
Wed, 28 Mar 2012 09:07:58 +0000 (10:07 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 28 Mar 2012 09:07:58 +0000 (10:07 +0100)
db/migrate/20120328090602_drop_session_table.rb [new file with mode: 0644]

diff --git a/db/migrate/20120328090602_drop_session_table.rb b/db/migrate/20120328090602_drop_session_table.rb
new file mode 100644 (file)
index 0000000..e5f9739
--- /dev/null
@@ -0,0 +1,17 @@
+require 'migrate'
+
+class DropSessionTable < ActiveRecord::Migration
+  def up
+    drop_table "sessions"
+  end
+
+  def down
+    create_table "sessions", :options => innodb_option 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