Sha256: 8a4f4f2e8d2d5409c620c2cca355d5bb8e7b4bf1c1e92cc81d712e10957b6ef4

Contents?: true

Size: 894 Bytes

Versions: 3

Compression:

Stored size: 894 Bytes

Contents

class CreateEcomCoreWorkOrders < ActiveRecord::Migration[6.0]
  def change
    create_table :ecom_core_work_orders do |t|
      t.string :name
      t.string :reference_number
      t.references :work_package,
                   null: false,
                   index: { name: 'wo_on_wp_indx' },
                   foreign_key: { to_table: :ecom_core_work_packages }
      t.references :assigned_to,
                   null: false,
                   index: { name: 'wo_on_at_indx' },
                   foreign_key: { to_table: :ecom_core_crews }

      t.references :generated_by,
                   null: false,
                   index: { name: 'wo_on_gb_indx' },
                   foreign_key: { to_table: :ecom_core_users }

      t.date :start_date, null: false
      t.date :end_date, null: false
      t.string :status, null: false, default: :new

      t.timestamps
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ecom_core-1.3.14 db/migrate/20191207103731_create_ecom_core_work_orders.rb
ecom_core-1.3.13 db/migrate/20191207103731_create_ecom_core_work_orders.rb
ecom_core-1.3.12 db/migrate/20191207103731_create_ecom_core_work_orders.rb