about summary refs log blame commit diff
path: root/db/migrate/20170623152212_create_session_activations.rb
blob: 81c776135eafd6ab06f642be84b09882371a27c6 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13











                                                             
class CreateSessionActivations < ActiveRecord::Migration[5.1]
  def change
    create_table :session_activations do |t|
      t.integer :user_id,   null: false
      t.string :session_id, null: false

      t.timestamps
    end

    add_index :session_activations, :user_id
    add_index :session_activations, :session_id, unique: true
  end
end