Sha256: a593b36078ef925a5a3a1bd56cee2444626203d0ee2daa620942cf717cb1ea2e

Contents?: true

Size: 1.2 KB

Versions: 16

Compression:

Stored size: 1.2 KB

Contents

class CreateEcomCoreResourceRequisitionItems < ActiveRecord::Migration[6.0]
  def change
    create_table :ecom_core_resource_requisition_items do |t|
      t.references :resource_requisition,
                   null: false,
                   index: { name: 'rri_on_rr_indx' },
                   foreign_key: { to_table: :ecom_core_resource_requisitions }

      t.references :resource_type,
                   null: false,
                   index: { name: 'rri_on_rt_indx' },
                   foreign_key: { to_table: :ecom_core_resource_types }

      t.float :requested_quantity, null: false

      t.references :requested_quantity_measurement_unit,
                   null: false,
                   index: { name: 'rri_on_rqmu_indx' },
                   foreign_key: { to_table: :ecom_core_measurement_units }

      t.float :awaiting_quantity, null: false

      t.references :awaiting_quantity_measurement_unit,
                   null: false,
                   index: { name: 'rri_on_aqmu_indx' },
                   foreign_key: { to_table: :ecom_core_measurement_units }
      t.string :status, null: false, default: 'Pending'
      t.datetime :due_date, null: false
      
      t.timestamps
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ecom_core-1.3.14 db/migrate/20201126191349_create_ecom_core_resource_requisition_items.rb
ecom_core-1.3.13 db/migrate/20201126191349_create_ecom_core_resource_requisition_items.rb
ecom_core-1.3.12 db/migrate/20201126191349_create_ecom_core_resource_requisition_items.rb
ecom_core-1.3.11 db/migrate/20201126191349_create_ecom_core_resource_requisition_items.rb
ecom_core-1.3.10 db/migrate/20201126191349_create_ecom_core_resource_requisition_items.rb
ecom_core-1.3.9 db/migrate/20201126191349_create_ecom_core_resource_requisition_items.rb
ecom_core-1.3.8 db/migrate/20201126191349_create_ecom_core_resource_requisition_items.rb
ecom_core-1.3.7 db/migrate/20201126191349_create_ecom_core_resource_requisition_items.rb
ecom_core-1.3.6 db/migrate/20201126191349_create_ecom_core_resource_requisition_items.rb
ecom_core-1.3.5 db/migrate/20201126191349_create_ecom_core_resource_requisition_items.rb
ecom_core-1.3.4 db/migrate/20201126191349_create_ecom_core_resource_requisition_items.rb
ecom_core-1.3.3 db/migrate/20201126191349_create_ecom_core_resource_requisition_items.rb
ecom_core-1.3.2 db/migrate/20201126191349_create_ecom_core_resource_requisition_items.rb
ecom_core-1.3.1 db/migrate/20201126191349_create_ecom_core_resource_requisition_items.rb
ecom_core-1.3.0 db/migrate/20201126191349_create_ecom_core_resource_requisition_items.rb
ecom_core-1.2.36 db/migrate/20201126191349_create_ecom_core_resource_requisition_items.rb