Add indicator for processed messages
All checks were successful
CI / scan_ruby (push) Successful in 17s
CI / scan_js (push) Successful in 12s
CI / lint (push) Successful in 14s
CI / test (push) Successful in 36s

This commit is contained in:
sto
2025-06-18 18:42:04 +02:00
parent 96b8553b1f
commit 67d2ef41b3
13 changed files with 42 additions and 11 deletions

View File

@@ -0,0 +1,5 @@
class AddMessageRefToCompletion < ActiveRecord::Migration[8.0]
def change
add_reference :completions, :message, foreign_key: true
end
end

5
db/schema.rb generated
View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[8.0].define(version: 2025_06_18_122655) do
ActiveRecord::Schema[8.0].define(version: 2025_06_18_155041) do
create_table "active_storage_attachments", force: :cascade do |t|
t.string "name", null: false
t.string "record_type", null: false
@@ -48,8 +48,10 @@ ActiveRecord::Schema[8.0].define(version: 2025_06_18_122655) do
t.integer "contest_id", null: false
t.string "display_time_from_start"
t.string "display_relative_time"
t.integer "message_id"
t.index ["contest_id"], name: "index_completions_on_contest_id"
t.index ["contestant_id"], name: "index_completions_on_contestant_id"
t.index ["message_id"], name: "index_completions_on_message_id"
t.index ["puzzle_id"], name: "index_completions_on_puzzle_id"
end
@@ -138,6 +140,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_06_18_122655) do
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
add_foreign_key "completions", "contestants"
add_foreign_key "completions", "contests"
add_foreign_key "completions", "messages"
add_foreign_key "completions", "puzzles"
add_foreign_key "contestants", "contests"
add_foreign_key "contests", "users"