Sha256: 5462f9a4f2ee5acc7c2710b0166366cec3108af60b7799e85f36bda2b50cbc4f

Contents?: true

Size: 1.29 KB

Versions: 5

Compression:

Stored size: 1.29 KB

Contents

class CreateComeeCorePurchaseRequisitionItems < ActiveRecord::Migration[7.1]
  def change
    create_table :comee_core_purchase_requisition_items do |t|
      t.references :product,
                   null: false,
                   index: {name: "product_on_ccpri_indx"},
                   foreign_key: {to_table: :comee_core_products}
      t.references :unit,
                   null: false,
                   index: {name: "unit_on_ccpri_indx"},
                   foreign_key: {to_table: :comee_core_units}
      t.references :supplier,
                   null: false,
                   index: {name: "supplier_on_ccpri_indx"},
                   foreign_key: {to_table: :comee_core_suppliers}
      t.references :purchase_requisition,
                   null: false,
                   index: {name: "pr_on_ccpri_indx"},
                   foreign_key: {to_table: :comee_core_purchase_requisitions}
      t.references :purchase_order_item,
                   null: true,
                   index: {name: "poi_on_ccpri_indx"},
                   foreign_key: {to_table: :comee_core_purchase_order_items}
      t.float :quantity, null: false
      t.float :price, null: false
      t.float :total_price, null: false
      t.integer :processing_status, null: false, default: 0

      t.timestamps
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
comee_core-0.2.40 db/migrate/20240314111307_create_comee_core_purchase_requisition_items.rb
comee_core-0.2.39 db/migrate/20240314111307_create_comee_core_purchase_requisition_items.rb
comee_core-0.2.38 db/migrate/20240314111307_create_comee_core_purchase_requisition_items.rb
comee_core-0.2.37 db/migrate/20240314111307_create_comee_core_purchase_requisition_items.rb
comee_core-0.2.36 db/migrate/20240314111307_create_comee_core_purchase_requisition_items.rb