This commit is contained in:
Mohammad Kanaan 2026-05-30 19:39:28 +03:00
parent 5a9f9ee10c
commit 82f48c9ad3

View file

@ -2,7 +2,7 @@ class CreateVotes < ActiveRecord::Migration[8.0]
def change def change
create_table :votes do |t| create_table :votes do |t|
t.references :user, null: false, foreign_key: true t.references :user, null: false, foreign_key: true
t.string :votable=references{polymorphic} t.references :votable, polymorphic: true, null: false
t.integer :direction t.integer :direction
t.timestamps t.timestamps