Files
fizzy/db/migrate/20251006091442_create_user_highlights.rb
T
Jorge Manrubia 3e67da7d0e Add a new join model to link summaries with users
So that changing the set of events does not result in not being able to find a generated highlight summary
2025-10-06 12:33:28 +02:00

14 lines
374 B
Ruby

class CreateUserHighlights < ActiveRecord::Migration[8.1]
def change
create_table :user_weekly_highlights do |t|
t.references :user, null: false, foreign_key: true
t.references :period_highlights, null: false, foreign_key: true
t.date :starts_at, null: false
t.timestamps
t.index %i[ user_id starts_at ], unique: true
end
end
end