price-point-api/db/migrate/20260530152329_create_votes.rb

12 lines
275 B
Ruby
Raw Permalink Normal View History

2026-05-30 16:15:24 +00:00
class CreateVotes < ActiveRecord::Migration[8.0]
def change
create_table :votes do |t|
t.references :user, null: false, foreign_key: true
2026-05-30 16:39:28 +00:00
t.references :votable, polymorphic: true, null: false
2026-05-30 16:15:24 +00:00
t.integer :direction
t.timestamps
end
end
end