Sha256: e810fa584d9e2c0676532c6d6061c195b15b63e72c272331c217ddac5095ca14
Contents?: true
Size: 1.5 KB
Versions: 5
Compression:
Stored size: 1.5 KB
Contents
class CreateEcomModelWorkComponents < ActiveRecord::Migration[6.0] def change create_table :ecom_model_work_components do |t| t.string :name, null: false t.json :dimension t.string :assignment_status, null: false, default: :unassigned t.string :task_status, null: false, default: :new t.integer :percent_completed, null: false, default: 0 t.string :remark t.references :performer, index: { name: 'wc_on_performer_indx' } t.references :approver, index: { name: 'wc_on_approver_indx' } t.references :supervisor, index: { name: 'wc_on_supervisor_indx' } t.references :quality_controller, index: { name: 'wc_on_qc_indx' } t.date :start_date t.date :completion_date t.references :work_component_template, index: { name: 'wct_on_wc_indx' } t.references :work_product, index: { name: 'wp_on_wc_indx' } t.timestamps end add_foreign_key :ecom_model_work_components, :ecom_model_users, column: :performer_id add_foreign_key :ecom_model_work_components, :ecom_model_users, column: :approver_id add_foreign_key :ecom_model_work_components, :ecom_model_users, column: :supervisor_id add_foreign_key :ecom_model_work_components, :ecom_model_users, column: :quality_controller_id add_foreign_key :ecom_model_work_components, :ecom_model_work_component_templates, column: :work_component_template_id add_foreign_key :ecom_model_work_components, :ecom_model_work_products, column: :work_product_id end end
Version data entries
5 entries across 5 versions & 1 rubygems