Sha256: 88ba45a0ba82b7e89fa454463c06e371f7bb0345d2e87182e229cbbac63e368e

Contents?: true

Size: 1007 Bytes

Versions: 1

Compression:

Stored size: 1007 Bytes

Contents

class CreateComeeCorePurchaseOrderItems < ActiveRecord::Migration[7.1]
  def change
    create_table :comee_core_purchase_order_items do |t|
      t.references :purchase_order,
                   null: false,
                   index: {name: "pos_on_ccpoitm_indx"},
                   foreign_key: {to_table: :comee_core_purchase_orders}

      t.references :source, polymorphic: true, null: false
      t.float :quantity, null: false
      t.float :confirmed_quantity, null: false
      t.references :unit,
                   null: false,
                   index: {name: "unit_on_ccpoitm_indx"},
                   foreign_key: {to_table: :comee_core_units}
      t.float :price, null: false
      t.float :confirmed_price, null: false
      t.float :total_price, null: false
      t.float :confirmed_total_price, null: false
      t.date :delivery_date, null: false
      t.date :confirmed_delivery_date, null: false
      t.integer :status, null: false, default: 0

      t.timestamps
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
comee_core-0.2.36 db/migrate/20230728123827_create_comee_core_purchase_order_items.rb