Sha256: 6fd70f4bd0b2ccf1592fe988b26c1547753fa2991f28362d22efb052f2a4ac7e

Contents?: true

Size: 737 Bytes

Versions: 1

Compression:

Stored size: 737 Bytes

Contents

require "jobshop/helpers/migration.rb"

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

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

      t.uuid :created_by_id, null: false

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

      t.text :description

      t.timestamps
    end

    idx_table_name_pkey "jobshop_products"
    fk_organization_id "jobshop_products"
    fk_created_by_id "jobshop_products"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jobshop-0.0.157 db/migrate/20171216022135_create_products.rb