Minor fixes to complete the upgrade from 1.6.1 to 1.7.0
* Update README * Perform upgrade testing from most recent full release version (1.6.1) Fixes #278
This commit is contained in:
@@ -26,18 +26,17 @@ SELECT
|
||||
*
|
||||
FROM
|
||||
(SELECT DISTINCT
|
||||
row_number() over (partition by Id order by AgeGroupId desc) as seqnum, view_GamesWithRoms.*,
|
||||
(SELECT
|
||||
AgeGroupId
|
||||
FROM
|
||||
ClassificationMap
|
||||
WHERE
|
||||
RatingId = AgeRating.Rating
|
||||
ORDER BY AgeGroupId DESC) AgeGroupId
|
||||
row_number() over (partition by Id order by AgeGroup.AgeGroupId desc) as seqnum, view_GamesWithRoms.*,
|
||||
AgeGroup.AgeGroupId AS AgeGroupId
|
||||
FROM
|
||||
view_GamesWithRoms
|
||||
LEFT JOIN Relation_Game_AgeRatings ON view_GamesWithRoms.Id = Relation_Game_AgeRatings.GameId
|
||||
LEFT JOIN AgeRating ON Relation_Game_AgeRatings.AgeRatingsId = AgeRating.Id
|
||||
LEFT JOIN (SELECT
|
||||
AgeGroupId, RatingId
|
||||
FROM
|
||||
ClassificationMap
|
||||
ORDER BY AgeGroupId DESC) AgeGroup ON AgeRating.Rating = AgeGroup.RatingId
|
||||
) g
|
||||
WHERE g.seqnum = 1;
|
||||
|
||||
|
49
gaseous-server/Support/Database/MySQL/gaseous-fix-1005.sql
Normal file
49
gaseous-server/Support/Database/MySQL/gaseous-fix-1005.sql
Normal file
@@ -0,0 +1,49 @@
|
||||
CREATE TABLE `Relation_Game_AgeRatings` (
|
||||
`GameId` BIGINT NOT NULL,
|
||||
`AgeRatingsId` BIGINT NOT NULL,
|
||||
PRIMARY KEY (`GameId`, `AgeRatingsId`),
|
||||
INDEX `idx_PrimaryColumn` (`GameId` ASC) VISIBLE
|
||||
);
|
||||
|
||||
CREATE TABLE `Relation_Game_Genres` (
|
||||
`GameId` BIGINT NOT NULL,
|
||||
`GenresId` BIGINT NOT NULL,
|
||||
PRIMARY KEY (`GameId`, `GenresId`),
|
||||
INDEX `idx_PrimaryColumn` (`GameId` ASC) VISIBLE
|
||||
);
|
||||
|
||||
CREATE TABLE `Relation_Game_GameModes` (
|
||||
`GameId` BIGINT NOT NULL,
|
||||
`GameModesId` BIGINT NOT NULL,
|
||||
PRIMARY KEY (`GameId`, `GameModesId`),
|
||||
INDEX `idx_PrimaryColumn` (`GameId` ASC) VISIBLE
|
||||
);
|
||||
|
||||
CREATE TABLE `Relation_Game_PlayerPerspectives` (
|
||||
`GameId` BIGINT NOT NULL,
|
||||
`PlayerPerspectivesId` BIGINT NOT NULL,
|
||||
PRIMARY KEY (`GameId`, `PlayerPerspectivesId`),
|
||||
INDEX `idx_PrimaryColumn` (`GameId` ASC) VISIBLE
|
||||
);
|
||||
|
||||
CREATE TABLE `Relation_Game_Themes` (
|
||||
`GameId` BIGINT NOT NULL,
|
||||
`ThemesId` BIGINT NOT NULL,
|
||||
PRIMARY KEY (`GameId`, `ThemesId`),
|
||||
INDEX `idx_PrimaryColumn` (`GameId` ASC) VISIBLE
|
||||
);
|
||||
|
||||
ALTER TABLE `Games_Roms`
|
||||
ADD COLUMN `LastMatchAttemptDate` DATETIME NULL AFTER `LibraryId`;
|
||||
|
||||
CREATE TABLE `RomMediaGroup` (
|
||||
`Id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`Status` INT NULL,
|
||||
`PlatformId` BIGINT NULL,
|
||||
`GameId` BIGINT NULL,
|
||||
PRIMARY KEY (`Id`));
|
||||
|
||||
CREATE TABLE `RomMediaGroup_Members` (
|
||||
`GroupId` BIGINT NOT NULL,
|
||||
`RomId` BIGINT NOT NULL,
|
||||
PRIMARY KEY (`GroupId`, `RomId`));
|
Reference in New Issue
Block a user