Save display times in the db
All checks were successful
CI / scan_ruby (push) Successful in 17s
CI / scan_js (push) Successful in 11s
CI / lint (push) Successful in 12s
CI / test (push) Successful in 41s

This commit is contained in:
sto
2025-03-26 17:00:06 +01:00
parent c98caeea92
commit a5d165c4b3
14 changed files with 78 additions and 56 deletions

View File

@@ -0,0 +1,6 @@
class AddDisplayTimesToCompletions < ActiveRecord::Migration[8.0]
def change
add_column :completions, :display_time_from_start, :string
add_column :completions, :display_relative_time, :string
end
end

View File

@@ -0,0 +1,5 @@
class AddDisplayTimeToContestants < ActiveRecord::Migration[8.0]
def change
add_column :contestants, :display_time, :string
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_03_22_164205) do
ActiveRecord::Schema[8.0].define(version: 2025_03_26_153736) do
create_table "active_storage_attachments", force: :cascade do |t|
t.string "name", null: false
t.string "record_type", null: false
@@ -46,6 +46,8 @@ ActiveRecord::Schema[8.0].define(version: 2025_03_22_164205) do
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "contest_id", null: false
t.string "display_time_from_start"
t.string "display_relative_time"
t.index ["contest_id"], name: "index_completions_on_contest_id"
t.index ["contestant_id"], name: "index_completions_on_contestant_id"
t.index ["puzzle_id"], name: "index_completions_on_puzzle_id"
@@ -57,6 +59,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_03_22_164205) do
t.integer "contest_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "display_time"
t.index ["contest_id"], name: "index_contestants_on_contest_id"
end