WIP 2
This commit is contained in:
parent
5a9f9ee10c
commit
82f48c9ad3
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue