Sha256: d36944377a71c6bb87cfe16a3ad5f3de0de1050108f806ddfb7fc14445e93289

Contents?: true

Size: 714 Bytes

Versions: 1

Compression:

Stored size: 714 Bytes

Contents

# frozen_string_literals: true

require "jobshop/helpers/migration.rb"

class CreateSessions < ActiveRecord::Migration[5.2]
  include Jobshop::Helpers::Migration

  def change
    create_table :jobshop_sessions, id: false do |t|
      t.uuid :organization_id, null: false
      t.uuid :user_id, null: false
      t.string :activation_token, null: false, activation_token: { unique: true }
      t.index %i[ organization_id user_id activation_token ], unique: true,
        name: :idx_jobshop_sessions_pkey
      t.timestamps
    end

    idx_table_name_pkey :jobshop_sessions
    fk_organization_id :jobshop_sessions
    foreign_key :jobshop_sessions, :jobshop_users,
      %i[ organization_id user_id ]
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jobshop-0.0.163 db/migrate/20171216023022_create_sessions.rb