price-point-api/db/migrate/20260609155259_create_sessions.rb

14 lines
316 B
Ruby
Raw Permalink Normal View History

2026-06-09 15:59:17 +00:00
class CreateSessions < ActiveRecord::Migration[8.0]
def change
create_table :sessions do |t|
t.references :user, null: false, foreign_key: true
t.string :token
t.string :user_agent
t.string :ip_address
t.timestamps
end
add_index :sessions, :token, unique: true
end
end