Sha256: ac29704f2b7910f0a5acfe81b72c569dc54ac8871599a3a8cc4c65114190d943

Contents?: true

Size: 949 Bytes

Versions: 61

Compression:

Stored size: 949 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, index: { name: 'wct_on_wpt_indx' }
      t.references :task_template, index: { name: 'wct_on_tt_indx' }

      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'
    add_foreign_key :ecom_core_work_component_templates, :ecom_core_work_product_templates,
                    column: :work_product_template_id
    add_foreign_key :ecom_core_work_component_templates, :ecom_core_task_templates,
                    column: :task_template_id
  end
end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
ecom_core-1.1.14 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.1.13 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.1.12 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.1.11 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.1.10 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.1.9 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.1.8 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.1.7 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.1.6 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.1.5 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.1.4 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.1.3 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.1.2 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.1.1 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.1.0 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.0.25 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.0.24 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.0.23 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.0.22 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb
ecom_core-1.0.21 db/migrate/20191201134420_create_ecom_core_work_component_templates.rb