notebook/db/migrate/20170415192437_create_votes.rb
2018-07-05 01:10:52 -05:00

11 lines
260 B
Ruby

class CreateVotes < ActiveRecord::Migration[4.2]
def change
create_table :votes do |t|
t.references :user, index: true, foreign_key: true
t.references :votable, index: true, foreign_key: true
t.timestamps null: false
end
end
end