super-graph/examples/rails-app/db/migrate/20190322200743_purchases.rb

13 lines
314 B
Ruby
Raw Permalink Normal View History

2019-03-24 14:57:29 +01:00
class Purchases < ActiveRecord::Migration[5.2]
def change
create_table :purchases do |t|
t.references :customer, foreign_key: true
t.references :product, foreign_key: true
t.string :sale_type
t.integer :quantity
t.datetime :due_date
t.datetime :returned
end
end
end