Sha256: e1e6dadaadd2f66390e393bd49fbbc555ecf4dd6c698827ed44caeed42805eae

Contents?: true

Size: 817 Bytes

Versions: 2

Compression:

Stored size: 817 Bytes

Contents

class CreateEcomCoreWorkProductTemplates < ActiveRecord::Migration[6.0]
  def change
    create_table :ecom_core_work_product_templates do |t|
      t.string :code, null: false, unique: true
      t.string :name, null: false, unique: true
      t.string :description
      t.string :remark

      t.timestamps
    end

    create_table :ecom_core_task_templates_work_product_templates do |t|
      t.references :task_template,
                   null: false,
                   index: { name: 'ttwpt_on_tt_indx' },
                   foreign_key: { to_table: :ecom_core_task_templates }
      t.references :work_product_template,
                   null: false,
                   index: { name: 'ttwpt_on_wpt_indx' },
                   foreign_key: { to_table: :ecom_core_work_product_templates }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ecom_core-1.2.16 db/migrate/20191119013236_create_ecom_core_work_product_templates.rb
ecom_core-1.2.15 db/migrate/20191119013236_create_ecom_core_work_product_templates.rb