Sha256: c80ccc31c4d5edd249e5c04bd21c4ac366da5fae43dde0ab40defc6289feac49

Contents?: true

Size: 1.17 KB

Versions: 8

Compression:

Stored size: 1.17 KB

Contents

class CreateComeeCoreSalesOrderItems < ActiveRecord::Migration[7.0]
  def change
    create_table :comee_core_sales_order_items do |t|
      t.references :sales_order,
                   null: false,
                   index: {name: "so_on_ccsoi_indx"},
                   foreign_key: {to_table: :comee_core_sales_orders}
      t.references :product,
                   null: false,
                   index: {name: "product_on_ccsoi_indx"},
                   foreign_key: {to_table: :comee_core_products}
      t.references :unit,
                   null: false,
                   index: {name: "unit_on_ccsoi_indx"},
                   foreign_key: {to_table: :comee_core_units}
      t.references :customer_order_item,
                   null: false,
                   index: {name: "coi_on_ccsoi_indx"},
                   foreign_key: {to_table: :comee_core_customer_order_items}
      t.float :quantity, null: false
      t.float :quantity_delivered, null: false, default: 0
      t.float :price, null: false
      t.date :delivery_date, null: false
      t.boolean :canceled, default: false
      t.date :handover_date
      t.string :eb_number

      t.timestamps
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
comee_core-0.1.47 db/migrate/20230812212844_create_comee_core_sales_order_items.rb
comee_core-0.1.46 db/migrate/20230812212844_create_comee_core_sales_order_items.rb
comee_core-0.1.45 db/migrate/20230812212844_create_comee_core_sales_order_items.rb
comee_core-0.1.45.pre3 db/migrate/20230812212844_create_comee_core_sales_order_items.rb
comee_core-0.1.45.pre2 db/migrate/20230812212844_create_comee_core_sales_order_items.rb
comee_core-0.1.45.pre db/migrate/20230812212844_create_comee_core_sales_order_items.rb
comee_core-0.1.44 db/migrate/20230812212844_create_comee_core_sales_order_items.rb
comee_core-0.1.43 db/migrate/20230812212844_create_comee_core_sales_order_items.rb