Sha256: 596cd264c34c6e1a4a42b53c654f770a4c3aa3487720b0a22053beedfc06884e

Contents?: true

Size: 716 Bytes

Versions: 1

Compression:

Stored size: 716 Bytes

Contents

require "jobshop/helpers/migration.rb"

class CreateCompanies < ActiveRecord::Migration[5.1]
  include Jobshop::Helpers::Migration

  def change
    create_table :jobshop_companies, id: false do |t|
      t.uuid :organization_id, null: false
      t.uuid :company_id, null: false, default: "gen_random_uuid()"
      t.index [ :organization_id, :company_id ], unique: true,
        name: "idx_jobshop_companies_pkey"

      t.uuid :created_by_id, null: false

      t.citext :name, null: false
      t.index [ :organization_id, :name ], unique: true

      t.timestamps
    end

    idx_table_name_pkey "jobshop_companies"
    fk_organization_id "jobshop_companies"
    fk_created_by_id "jobshop_companies"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jobshop-0.0.157 db/migrate/20171216021853_create_companies.rb