Files
sx-fc/db/migrate/20170403174029_create_sale_orders.rb
2017-06-07 18:47:50 +06:30

13 lines
368 B
Ruby

class CreateSaleOrders < ActiveRecord::Migration[5.1]
def change
create_table :sale_orders, :id => false do |t|
t.primary_key :sale_order_id #custom primary key - to ensure consistence for cloud syncing
t.string :sale_id, foreign_key: true,:limit => 16
t.string :order_id, foreign_key: true, :limit => 16
t.timestamps
end
end
end