Sha256: 1c024c7c4a4c6dc0061ef0dc1bc4c638a92142808766cf994fb948ab39891850

Contents?: true

Size: 537 Bytes

Versions: 5

Compression:

Stored size: 537 Bytes

Contents

class CreateEcomModelProductTypes < ActiveRecord::Migration[6.0]
  def change
    create_table :ecom_model_product_types do |t|
      t.string :name, null: false
      t.references :work_product_template, index: { name: 'pt_on_wpt_indx' }
      t.json :dimension

      t.timestamps
    end

    add_index :ecom_model_product_types, %i[name work_product_template_id], unique: true, name: 'wpt_on_pt_name_indx'
    add_foreign_key :ecom_model_product_types, :ecom_model_work_product_templates, column: :work_product_template_id
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ecom_model-2.0.4 db/migrate/20191201131341_create_ecom_model_product_types.rb
ecom_model-2.0.3 db/migrate/20191201131341_create_ecom_model_product_types.rb
ecom_model-2.0.2 db/migrate/20191201131341_create_ecom_model_product_types.rb
ecom_model-2.0.1 db/migrate/20191201131341_create_ecom_model_product_types.rb
ecom_model-2.0.0 db/migrate/20191201131341_create_ecom_model_product_types.rb