Sha256: 004b176520b69d9051f9f4514bd1765eeb610f666652b69b7799a63458ab7f9b
Contents?: true
Size: 1.8 KB
Versions: 8
Compression:
Stored size: 1.8 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, null: false, index: { name: 'task_on_wp_indx' }, foreign_key: { to_table: :ecom_core_tasks } t.references :work_product_template, null: false, index: { name: 'wpt_on_wp_indx' }, foreign_key: { to_table: :ecom_core_work_product_templates } t.references :project, null: false, index: { name: 'projects_on_wp_indx' }, foreign_key: { to_table: :ecom_core_projects } t.string :assignment_status, default: 'UNASSIGNED' t.string :task_status, default: 'NEW' t.integer :percent_completed t.string :remark t.references :performer, null: true, index: false, foreign_key: { to_table: :ecom_core_users } t.references :approver, null: true, index: false, foreign_key: { to_table: :ecom_core_users } t.references :supervisor, null: true, index: false, foreign_key: { to_table: :ecom_core_users } t.references :quality_controller, null: true, index: false, foreign_key: { to_table: :ecom_core_users } t.datetime :start_date t.datetime :completion_date t.timestamps end add_index :ecom_core_work_products, %i[code project_id], unique: true end end
Version data entries
8 entries across 8 versions & 1 rubygems