Sha256: b09013f7d75386fea09971b3d00bf25837695ef1a5c53fa89d67c3ad0d341ac0

Contents?: true

Size: 1.74 KB

Versions: 16

Compression:

Stored size: 1.74 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 :work_package,
                   null: true,
                   index: { name: 'wp_on_wp_indx' },
                   foreign_key: { to_table: :ecom_core_work_packages }
      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

16 entries across 16 versions & 1 rubygems

Version Path
ecom_core-1.2.31 db/migrate/20191207103735_create_ecom_core_tasks.rb
ecom_core-1.2.30 db/migrate/20191207103735_create_ecom_core_tasks.rb
ecom_core-1.2.29 db/migrate/20191207103735_create_ecom_core_tasks.rb
ecom_core-1.2.28 db/migrate/20191207103735_create_ecom_core_tasks.rb
ecom_core-1.2.27 db/migrate/20191207103735_create_ecom_core_tasks.rb
ecom_core-1.2.26 db/migrate/20191207103735_create_ecom_core_tasks.rb
ecom_core-1.2.24 db/migrate/20191207103735_create_ecom_core_tasks.rb
ecom_core-1.2.23 db/migrate/20191207103735_create_ecom_core_tasks.rb
ecom_core-1.2.22 db/migrate/20191207103735_create_ecom_core_tasks.rb
ecom_core-1.2.21 db/migrate/20191207103735_create_ecom_core_tasks.rb
ecom_core-1.2.20 db/migrate/20191207103735_create_ecom_core_tasks.rb
ecom_core-1.2.19 db/migrate/20191207103735_create_ecom_core_tasks.rb
ecom_core-1.2.18 db/migrate/20191207103735_create_ecom_core_tasks.rb
ecom_core-1.2.17 db/migrate/20191207103735_create_ecom_core_tasks.rb
ecom_core-1.2.16 db/migrate/20191207103735_create_ecom_core_tasks.rb
ecom_core-1.2.15 db/migrate/20191207103735_create_ecom_core_tasks.rb