17 lines
459 B
Ruby
17 lines
459 B
Ruby
|
|
class CreatePriceReports < ActiveRecord::Migration[8.0]
|
||
|
|
def change
|
||
|
|
create_table :price_reports do |t|
|
||
|
|
t.decimal :price
|
||
|
|
t.decimal :discount_price
|
||
|
|
t.integer :upvotes
|
||
|
|
t.integer :downvotes
|
||
|
|
t.datetime :reported_at
|
||
|
|
t.references :product, null: false, foreign_key: true
|
||
|
|
t.references :store, null: false, foreign_key: true
|
||
|
|
t.references :guest, null: false, foreign_key: true
|
||
|
|
|
||
|
|
t.timestamps
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end
|