Sha256: 524f77c536bf49d2117079f827262f538db79c0e14f9fde167f4b3337dccf159
Contents?: true
Size: 1.76 KB
Versions: 61
Compression:
Stored size: 1.76 KB
Contents
class CreateEcomCoreWorkProducts < ActiveRecord::Migration[6.0] def change create_table :ecom_core_work_products do |t| t.string :code, null: false t.string :name, null: false t.string :description t.string :design_reference_no, unique: true t.json :dimension t.references :task, index: { name: 'task_on_wp_indx' } t.references :work_product_template, index: { name: 'wpt_on_wp_indx' } t.references :project, index: { name: 'projects_on_wp_indx' } t.string :assignment_status, default: 'UNASSIGNED' t.string :task_status, default: 'NEW' t.integer :percent_completed t.string :remark t.references :performer, index: { name: 'pr_on_work_product_indx' } t.references :approver, index: { name: 'app_on_work_product_indx' } t.references :supervisor, index: { name: 'sup_on_work_product_indx' } t.references :quality_controller, index: { name: 'qut_ctr_on_work_product_indx' } t.datetime :start_date t.datetime :completion_date t.timestamps end add_index :ecom_core_work_products, %i[code project_id], unique: true add_foreign_key :ecom_core_work_products, :ecom_core_tasks, column: :task_id add_foreign_key :ecom_core_work_products, :ecom_core_work_product_templates, column: :work_product_template_id add_foreign_key :ecom_core_work_products, :ecom_core_projects, column: :project_id add_foreign_key :ecom_core_work_products, :ecom_core_users, column: :performer_id add_foreign_key :ecom_core_work_products, :ecom_core_users, column: :approver_id add_foreign_key :ecom_core_work_products, :ecom_core_users, column: :supervisor_id add_foreign_key :ecom_core_work_products, :ecom_core_users, column: :quality_controller_id end end
Version data entries
61 entries across 61 versions & 1 rubygems