testy/db/migrate/20260517111110_create_price_reports.rb

17 lines
459 B
Ruby
Raw Permalink Normal View History

2026-05-17 11:12:43 +00:00
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