Sha256: e90157a2d5025477c55a936763708f8fae78bfe77cd2508ed50e40291d552552

Contents?: true

Size: 1.56 KB

Versions: 1

Compression:

Stored size: 1.56 KB

Contents

class CreateEcomCoreTasks < ActiveRecord::Migration[6.0]
  def change
    create_table :ecom_core_tasks do |t|
      t.string :code, null: false
      t.string :name, null: false
      t.string :description
      t.string :ancestry
      t.date :start_date
      t.date :end_date
      t.string :status, null: false, default: :new
      t.integer :percent_completed, null: false, default: 0
      t.string :remark
      t.references :performer,
                   null: true,
                   index: { name: 'tasks_on_performer_indx' },
                   foreign_key: { to_table: :ecom_core_users }
      t.references :approver,
                   null: true,
                   index: { name: 'tasks_on_approver_indx' },
                   foreign_key: { to_table: :ecom_core_users }
      t.references :supervisor,
                   null: true,
                   index: { name: 'tasks_on_supervisor_indx' },
                   foreign_key: { to_table: :ecom_core_users }
      t.references :quality_controller,
                   null: true,
                   index: { name: 'tasks_on_qc_indx' },
                   foreign_key: { to_table: :ecom_core_users }
      t.references :work_product,
                   null: false,
                   index: { name: 'tasks_on_wp_indx' },
                   foreign_key: { to_table: :ecom_core_work_products }
      t.references :task_template,
                   null: false,
                   index: { name: 'tt_on_project_indx' },
                   foreign_key: { to_table: :ecom_core_task_templates }

      t.timestamps
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ecom_core-1.2.25 db/migrate/20191207103735_create_ecom_core_tasks.rb