mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
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>
14 lines
915 B
SQL
14 lines
915 B
SQL
/* 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;
|