Skip to content

Commit 124bc52

Browse files
committed
Create and run migration to drop sessions table
Our app is using the cookie_store https://github.com/portagenetwork/roadmap/blob/deployment-portage/config/initializers/session_store.rb. As a result, the sessions table is no longer needed.
1 parent 9a9e6e2 commit 124bc52

File tree

2 files changed

+112
-107
lines changed

2 files changed

+112
-107
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class DropSessionsTable < ActiveRecord::Migration[6.1]
2+
def up
3+
drop_table :sessions
4+
end
5+
6+
def down
7+
# rollback will the execute the initial migration code written to create the sessions table
8+
require Rails.root.join('db/migrate/20181024120747_add_sessions_table.rb')
9+
AddSessionsTable.new.change
10+
end
11+
end

0 commit comments

Comments
 (0)