full_stack_twitter_clone/db/migrate/20220328041843_create_sessi...

11 lines
216 B
Ruby

class CreateSessions < ActiveRecord::Migration[6.1]
def change
create_table :sessions do |t|
t.string :token
t.belongs_to :user, index: true, foreign_key: true
t.timestamps
end
end
end