Sha256: 3c5cdf08fd5694ddaad3377159003e6003d9cbd5cf1c2a2d5812ed46419729e4

Contents?: true

Size: 958 Bytes

Versions: 11

Compression:

Stored size: 958 Bytes

Contents

class CreateComeeCoreSalesOrders < ActiveRecord::Migration[7.0]
  def change
    create_table :comee_core_sales_orders do |t|
      t.string :order_number, null: false
      t.references :customer_order,
                   null: false,
                   index: {name: "co_on_ccso_indx"},
                   foreign_key: {to_table: :comee_core_customer_orders}
      t.references :fulfillment_center,
                   null: true,
                   index: {name: "fc_on_ccso_indx"},
                   foreign_key: {to_table: :comee_core_fulfillment_centers}
      t.float :payment_penalty, null: false, default: 0.0
      t.integer :status, null: false, default: 0
      t.float :total_price, null: false, default: 0
      t.float :amount_paid, null: false, default: 0
      t.string :pallete_note
      t.date :handover_date
      t.string :remark

      t.timestamps
    end
    add_index :comee_core_sales_orders, :order_number, unique: true
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
comee_core-0.1.64 db/migrate/20230812190652_create_comee_core_sales_orders.rb
comee_core-0.1.63 db/migrate/20230812190652_create_comee_core_sales_orders.rb
comee_core-0.1.62 db/migrate/20230812190652_create_comee_core_sales_orders.rb
comee_core-0.1.61 db/migrate/20230812190652_create_comee_core_sales_orders.rb
comee_core-0.1.60 db/migrate/20230812190652_create_comee_core_sales_orders.rb
comee_core-0.1.59 db/migrate/20230812190652_create_comee_core_sales_orders.rb
comee_core-0.1.58 db/migrate/20230812190652_create_comee_core_sales_orders.rb
comee_core-0.1.57 db/migrate/20230812190652_create_comee_core_sales_orders.rb
comee_core-0.1.56 db/migrate/20230812190652_create_comee_core_sales_orders.rb
comee_core-0.1.55 db/migrate/20230812190652_create_comee_core_sales_orders.rb
comee_core-0.1.54 db/migrate/20230812190652_create_comee_core_sales_orders.rb