Implement missing & remaining pieces propagation + cleaner forms
All checks were successful
CI / scan_ruby (push) Successful in 18s
CI / scan_js (push) Successful in 14s
CI / lint (push) Successful in 13s
CI / test (push) Successful in 34s

This commit is contained in:
sto
2025-11-10 12:26:48 +01:00
parent 6549124c08
commit f4136ea58a
15 changed files with 175 additions and 38 deletions

View File

@@ -0,0 +1,5 @@
class AddMissingPiecesToCompletion < ActiveRecord::Migration[8.0]
def change
add_column :completions, :missing_pieces, :integer
end
end

View File

@@ -0,0 +1,5 @@
class AddCompletedToCompletion < ActiveRecord::Migration[8.0]
def change
add_column :completions, :completed, :boolean
end
end

View File

@@ -0,0 +1,5 @@
class AddSubmittedToOffline < ActiveRecord::Migration[8.0]
def change
add_column :offlines, :submitted, :boolean
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_11_08_082751) do
ActiveRecord::Schema[8.0].define(version: 2025_11_10_110151) do
create_table "active_storage_attachments", force: :cascade do |t|
t.string "name", null: false
t.string "record_type", null: false
@@ -65,6 +65,8 @@ ActiveRecord::Schema[8.0].define(version: 2025_11_08_082751) do
t.string "display_relative_time"
t.integer "message_id"
t.integer "remaining_pieces"
t.integer "missing_pieces"
t.boolean "completed"
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"
@@ -137,6 +139,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_11_08_082751) do
t.integer "contestant_id"
t.integer "missing_pieces"
t.integer "remaining_pieces"
t.boolean "submitted"
t.index ["contest_id"], name: "index_offlines_on_contest_id"
t.index ["contestant_id"], name: "index_offlines_on_contestant_id"
end