Sha256: f31b86d291530da24325dd7c50a5ac6fdf7582a6507ba6b2061e0f8079bc3082

Contents?: true

Size: 313 Bytes

Versions: 8

Compression:

Stored size: 313 Bytes

Contents

class CreateSessions < ActiveRecord::Migration
  def up
    create_table :sessions do |t|
      t.string   :key,        null: false
      t.datetime :expiration
      t.integer  :user_id

      t.timestamps
    end

    add_index :sessions, :key, unique: true
  end

  def down
    drop_table :sessions
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
token_authenticate_me-0.4.3 lib/generators/token_authenticate_me/models/templates/session_migration.rb
token_authenticate_me-0.4.2 lib/generators/token_authenticate_me/models/templates/session_migration.rb
token_authenticate_me-0.4.1 lib/generators/token_authenticate_me/models/templates/session_migration.rb
token_authenticate_me-0.4.0 lib/generators/token_authenticate_me/models/templates/session_migration.rb
token_authenticate_me-0.3.0 lib/generators/token_authenticate_me/models/templates/session_migration.rb
token_authenticate_me-0.2.3 lib/generators/token_authenticate_me/models/templates/session_migration.rb
token_authenticate_me-0.2.2 lib/generators/token_authenticate_me/models/templates/session_migration.rb
token_authenticate_me-0.2.1 lib/generators/token_authenticate_me/models/templates/session_migration.rb