Now pre-compiles age group metadata instead of generating it on every query (#235)
* Server will now quit on start up if schema updates fail (closes Abort start up if an error occurs during database upgrade #221) * Moved AgeGroups to it's own class * Improved query performance by defining the AgeGroupId as a metadata item. A metadata refresh is required to generate this data
This commit is contained in:
18
gaseous-server/Support/Database/MySQL/gaseous-1011.sql
Normal file
18
gaseous-server/Support/Database/MySQL/gaseous-1011.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
CREATE TABLE `AgeGroup` (
|
||||
`Id` BIGINT NOT NULL,
|
||||
`GameId` BIGINT NULL,
|
||||
`AgeGroupId` INT NULL,
|
||||
`dateAdded` DATETIME NULL DEFAULT NULL,
|
||||
`lastUpdated` DATETIME NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`));
|
||||
|
||||
ALTER TABLE `Game`
|
||||
CHANGE COLUMN `Slug` `Slug` VARCHAR(255) NULL DEFAULT NULL;
|
||||
|
||||
CREATE OR REPLACE VIEW `view_Games` AS
|
||||
SELECT
|
||||
a.*, b.AgeGroupId
|
||||
FROM
|
||||
view_GamesWithRoms a
|
||||
LEFT JOIN AgeGroup b ON b.GameId = a.Id
|
||||
ORDER BY NameThe;
|
Reference in New Issue
Block a user