qi6_app/db/migrate/20180625210852_create_p_sheet_lines.rb
2019-05-17 12:30:45 +02:00

22 lines
635 B
Ruby

class CreatePSheetLines < ActiveRecord::Migration[6.0]
def change
create_table :p_sheet_lines do |t|
t.references :p_customer_sheet, index: true, foreign_key: true
t.references :p_product, index: true, foreign_key: true
t.references :p_tank, index: true, foreign_key: true
t.decimal :qte
t.decimal :price
t.datetime :ok_at
t.decimal :ok_qte
t.decimal :ok_price
t.decimal :ok_price_abs
t.boolean :ok
t.boolean :lock, :delfault => false
t.boolean :externe, :default => false
t.integer :externe_stock_id
t.timestamps null: false
end
end
end