mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 02:43:44 +00:00
feat(ugc): when each creation was made and how long it took, on the UGC page
The UGC server records how long each successful make took (process_ms on ugc and ugc_modular_build; migrations sqlite 73, mysql 90). The UGC page shows it with the time it was made: in the models list's Made column (sortable, slowest first), in the tiles' tooltips, in the item preview and in an assembly's References. The gallery can sort by slowest to make too. Makes from before this are shown without a duration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
13
migrations/dlu/mysql/90_ugc_process_time.sql
Normal file
13
migrations/dlu/mysql/90_ugc_process_time.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
/* UGC server: ugc.process_ms and ugc_modular_build.process_ms are how long the last successful make took, in
|
||||
milliseconds (0 until it has made it), shown on the dashboard's UGC page. */
|
||||
SET @dlu_column = (SELECT IF(COUNT(*) = 0, 'ALTER TABLE ugc ADD COLUMN process_ms INT UNSIGNED NOT NULL DEFAULT 0', 'DO 0') FROM information_schema.columns
|
||||
WHERE table_schema = DATABASE() AND table_name = 'ugc' AND column_name = 'process_ms');
|
||||
PREPARE dlu_column_stmt FROM @dlu_column;
|
||||
EXECUTE dlu_column_stmt;
|
||||
DEALLOCATE PREPARE dlu_column_stmt;
|
||||
|
||||
SET @dlu_column = (SELECT IF(COUNT(*) = 0, 'ALTER TABLE ugc_modular_build ADD COLUMN process_ms INT UNSIGNED NOT NULL DEFAULT 0', 'DO 0') FROM information_schema.columns
|
||||
WHERE table_schema = DATABASE() AND table_name = 'ugc_modular_build' AND column_name = 'process_ms');
|
||||
PREPARE dlu_column_stmt FROM @dlu_column;
|
||||
EXECUTE dlu_column_stmt;
|
||||
DEALLOCATE PREPARE dlu_column_stmt;
|
||||
3
migrations/dlu/sqlite/73_ugc_process_time.sql
Normal file
3
migrations/dlu/sqlite/73_ugc_process_time.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
/* UGC server: how long it took to make each model and car or rocket build. See the MySQL migration. */
|
||||
ALTER TABLE ugc ADD COLUMN process_ms INTEGER NOT NULL DEFAULT 0;
|
||||
ALTER TABLE ugc_modular_build ADD COLUMN process_ms INTEGER NOT NULL DEFAULT 0;
|
||||
Reference in New Issue
Block a user