Sha256: ec1d46ff4ef1b783ecb03c064dd916967699377d1fee0547e14a5b9125702636

Contents?: true

Size: 929 Bytes

Versions: 10

Compression:

Stored size: 929 Bytes

Contents

class CreateEcomCoreWorkComponentTemplates < ActiveRecord::Migration[6.0]
  def change
    create_table :ecom_core_work_component_templates do |t|
      t.string :code, null: false
      t.string :name, null: false
      t.string :description
      t.integer :relative_percentage
      t.json :dimension
      t.references :work_product_template,
                   null: false,
                   index: { name: 'wct_on_wpt_indx' },
                   foreign_key: { to_table: :ecom_core_work_product_templates }
      t.references :task_template,
                   null: false,
                   index: { name: 'wct_on_tt_indx' },
                   foreign_key: { to_table: :ecom_core_task_templates }

      t.timestamps
    end

    add_index :ecom_core_work_component_templates, %i[code work_product_template_id task_template_id],
              unique: true,
              name: 'wct_on_code_wpt_id_tt_id_indx'
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ecom_core-1.2.16 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.2.15 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.2.14 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.2.13 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.2.12 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.2.11 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.2.10 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.2.9 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.2.7 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.2.6 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb