Sha256: d8a5458df65df87407785cb80c38d43cc70643baf09ed4313e07750a58b44126

Contents?: true

Size: 1.93 KB

Versions: 12

Compression:

Stored size: 1.93 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.references :source,
                   null: true,
                   index: {name: "source_on_ccsoi_indx"},
                   foreign_key: {to_table: :comee_core_fulfillment_centers}
      t.references :purchase_order_item,
                   null: true,
                   index: {name: "poi_on_ccsoi_indx"},
                   foreign_key: {to_table: :comee_core_purchase_order_items}
      t.string :customer_item_no, null: false
      t.integer :serial_no, null: false, default: 1
      t.string :customer_item_description, null: false
      t.float :quantity, null: false
      t.float :quantity_delivered, null: false, default: 0
      t.float :quantity_canceled, null: false, default: 0
      t.float :price, null: false
      t.float :total_price, null: false
      t.date :delivery_date, null: false
      t.boolean :canceled, default: false
      t.date :handover_date
      t.string :eb_number
      t.integer :lead_time
      t.string :comment
      t.string :action_note
      t.integer :processing_status, null: false, default: 0

      t.timestamps
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
comee_core-0.3.0 db/migrate/20230812212844_create_comee_core_sales_order_items.rb
comee_core-0.2.99 db/migrate/20230812212844_create_comee_core_sales_order_items.rb
comee_core-0.2.98 db/migrate/20230812212844_create_comee_core_sales_order_items.rb
comee_core-0.2.97 db/migrate/20230812212844_create_comee_core_sales_order_items.rb
comee_core-0.2.96 db/migrate/20230812212844_create_comee_core_sales_order_items.rb
comee_core-0.2.95 db/migrate/20230812212844_create_comee_core_sales_order_items.rb
comee_core-0.2.94 db/migrate/20230812212844_create_comee_core_sales_order_items.rb
comee_core-0.2.93 db/migrate/20230812212844_create_comee_core_sales_order_items.rb
comee_core-0.2.92 db/migrate/20230812212844_create_comee_core_sales_order_items.rb
comee_core-0.2.91 db/migrate/20230812212844_create_comee_core_sales_order_items.rb
comee_core-0.2.90 db/migrate/20230812212844_create_comee_core_sales_order_items.rb
comee_core-0.2.89 db/migrate/20230812212844_create_comee_core_sales_order_items.rb