Code clean up and API versioning (#178)
* Merged tools project into main project * Applied API versioning
This commit is contained in:
476
gaseous-server/Support/Database/MySQL/gaseous-1000.sql
Normal file
476
gaseous-server/Support/Database/MySQL/gaseous-1000.sql
Normal file
@@ -0,0 +1,476 @@
|
||||
DROP TABLE IF EXISTS `AgeRating`;
|
||||
CREATE TABLE `AgeRating` (
|
||||
`Id` bigint NOT NULL,
|
||||
`Category` int DEFAULT NULL,
|
||||
`Checksum` varchar(45) DEFAULT NULL,
|
||||
`ContentDescriptions` longtext DEFAULT NULL,
|
||||
`Rating` int DEFAULT NULL,
|
||||
`RatingCoverUrl` varchar(255) DEFAULT NULL,
|
||||
`Synopsis` longtext,
|
||||
`dateAdded` datetime DEFAULT NULL,
|
||||
`lastUpdated` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `AgeRatingContentDescription`;
|
||||
CREATE TABLE `AgeRatingContentDescription` (
|
||||
`Id` bigint NOT NULL,
|
||||
`Category` int DEFAULT NULL,
|
||||
`Checksum` varchar(45) DEFAULT NULL,
|
||||
`Description` varchar(255) DEFAULT NULL,
|
||||
`dateAdded` datetime DEFAULT NULL,
|
||||
`lastUpdated` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `AlternativeName`;
|
||||
CREATE TABLE `AlternativeName` (
|
||||
`Id` bigint NOT NULL,
|
||||
`Checksum` varchar(45) DEFAULT NULL,
|
||||
`Comment` longtext,
|
||||
`Game` bigint DEFAULT NULL,
|
||||
`Name` varchar(255) DEFAULT NULL,
|
||||
`dateAdded` datetime DEFAULT NULL,
|
||||
`lastUpdated` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `Artwork`;
|
||||
CREATE TABLE `Artwork` (
|
||||
`Id` bigint NOT NULL,
|
||||
`AlphaChannel` tinyint(1) DEFAULT NULL,
|
||||
`Animated` tinyint(1) DEFAULT NULL,
|
||||
`Checksum` varchar(45) DEFAULT NULL,
|
||||
`Game` bigint DEFAULT NULL,
|
||||
`Height` int DEFAULT NULL,
|
||||
`ImageId` varchar(45) DEFAULT NULL,
|
||||
`Url` varchar(255) DEFAULT NULL,
|
||||
`Width` int DEFAULT NULL,
|
||||
`dateAdded` datetime DEFAULT NULL,
|
||||
`lastUpdated` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `Collection`;
|
||||
CREATE TABLE `Collection` (
|
||||
`Id` bigint NOT NULL,
|
||||
`Checksum` varchar(45) DEFAULT NULL,
|
||||
`Games` longtext DEFAULT NULL,
|
||||
`Name` varchar(255) DEFAULT NULL,
|
||||
`Slug` varchar(100) DEFAULT NULL,
|
||||
`CreatedAt` datetime DEFAULT NULL,
|
||||
`UpdatedAt` datetime DEFAULT NULL,
|
||||
`Url` varchar(255) DEFAULT NULL,
|
||||
`dateAdded` datetime DEFAULT NULL,
|
||||
`lastUpdated` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `Company`;
|
||||
CREATE TABLE `Company` (
|
||||
`Id` bigint NOT NULL,
|
||||
`ChangeDate` datetime DEFAULT NULL,
|
||||
`ChangeDateCategory` int DEFAULT NULL,
|
||||
`ChangedCompanyId` bigint DEFAULT NULL,
|
||||
`Checksum` varchar(45) DEFAULT NULL,
|
||||
`Country` int DEFAULT NULL,
|
||||
`CreatedAt` datetime DEFAULT NULL,
|
||||
`Description` longtext,
|
||||
`Developed` longtext DEFAULT NULL,
|
||||
`Logo` bigint DEFAULT NULL,
|
||||
`Name` varchar(255) DEFAULT NULL,
|
||||
`Parent` bigint DEFAULT NULL,
|
||||
`Published` longtext DEFAULT NULL,
|
||||
`Slug` varchar(100) DEFAULT NULL,
|
||||
`StartDate` datetime DEFAULT NULL,
|
||||
`StartDateCategory` int DEFAULT NULL,
|
||||
`UpdatedAt` datetime DEFAULT NULL,
|
||||
`Url` varchar(255) DEFAULT NULL,
|
||||
`Websites` longtext DEFAULT NULL,
|
||||
`dateAdded` datetime DEFAULT NULL,
|
||||
`lastUpdated` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `CompanyLogo`;
|
||||
CREATE TABLE `CompanyLogo` (
|
||||
`Id` bigint NOT NULL,
|
||||
`AlphaChannel` tinyint(1) DEFAULT NULL,
|
||||
`Animated` tinyint(1) DEFAULT NULL,
|
||||
`Checksum` varchar(45) DEFAULT NULL,
|
||||
`Height` int DEFAULT NULL,
|
||||
`ImageId` varchar(45) DEFAULT NULL,
|
||||
`Url` varchar(255) DEFAULT NULL,
|
||||
`Width` int DEFAULT NULL,
|
||||
`dateAdded` datetime DEFAULT NULL,
|
||||
`lastUpdated` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `Cover`;
|
||||
CREATE TABLE `Cover` (
|
||||
`Id` bigint NOT NULL,
|
||||
`AlphaChannel` tinyint(1) DEFAULT NULL,
|
||||
`Animated` tinyint(1) DEFAULT NULL,
|
||||
`Checksum` varchar(45) DEFAULT NULL,
|
||||
`Game` bigint DEFAULT NULL,
|
||||
`Height` int DEFAULT NULL,
|
||||
`ImageId` varchar(45) DEFAULT NULL,
|
||||
`Url` varchar(255) DEFAULT NULL,
|
||||
`Width` int DEFAULT NULL,
|
||||
`dateAdded` datetime DEFAULT NULL,
|
||||
`lastUpdated` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `ExternalGame`;
|
||||
CREATE TABLE `ExternalGame` (
|
||||
`Id` bigint NOT NULL,
|
||||
`Category` int DEFAULT NULL,
|
||||
`Checksum` varchar(45) DEFAULT NULL,
|
||||
`CreatedAt` datetime DEFAULT NULL,
|
||||
`Countries` longtext DEFAULT NULL,
|
||||
`Game` bigint DEFAULT NULL,
|
||||
`Media` int DEFAULT NULL,
|
||||
`Name` varchar(255) DEFAULT NULL,
|
||||
`Platform` bigint DEFAULT NULL,
|
||||
`Uid` varchar(255) DEFAULT NULL,
|
||||
`UpdatedAt` datetime DEFAULT NULL,
|
||||
`Url` varchar(255) DEFAULT NULL,
|
||||
`Year` int DEFAULT NULL,
|
||||
`dateAdded` datetime DEFAULT NULL,
|
||||
`lastUpdated` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `Franchise`;
|
||||
CREATE TABLE `Franchise` (
|
||||
`Id` bigint NOT NULL,
|
||||
`Checksum` varchar(45) DEFAULT NULL,
|
||||
`CreatedAt` datetime DEFAULT NULL,
|
||||
`UpdatedAt` datetime DEFAULT NULL,
|
||||
`Games` longtext DEFAULT NULL,
|
||||
`Name` varchar(255) DEFAULT NULL,
|
||||
`Slug` varchar(255) DEFAULT NULL,
|
||||
`Url` varchar(255) DEFAULT NULL,
|
||||
`dateAdded` datetime DEFAULT NULL,
|
||||
`lastUpdated` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `Game`;
|
||||
CREATE TABLE `Game` (
|
||||
`Id` bigint NOT NULL,
|
||||
`AgeRatings` longtext DEFAULT NULL,
|
||||
`AggregatedRating` double DEFAULT NULL,
|
||||
`AggregatedRatingCount` int DEFAULT NULL,
|
||||
`AlternativeNames` longtext DEFAULT NULL,
|
||||
`Artworks` longtext DEFAULT NULL,
|
||||
`Bundles` longtext DEFAULT NULL,
|
||||
`Category` int DEFAULT NULL,
|
||||
`Checksum` varchar(45) DEFAULT NULL,
|
||||
`Collection` bigint DEFAULT NULL,
|
||||
`Cover` bigint DEFAULT NULL,
|
||||
`CreatedAt` datetime DEFAULT NULL,
|
||||
`Dlcs` longtext DEFAULT NULL,
|
||||
`Expansions` longtext DEFAULT NULL,
|
||||
`ExternalGames` longtext DEFAULT NULL,
|
||||
`FirstReleaseDate` datetime DEFAULT NULL,
|
||||
`Follows` int DEFAULT NULL,
|
||||
`Franchise` bigint DEFAULT NULL,
|
||||
`Franchises` longtext DEFAULT NULL,
|
||||
`GameEngines` longtext DEFAULT NULL,
|
||||
`GameModes` longtext DEFAULT NULL,
|
||||
`Genres` longtext DEFAULT NULL,
|
||||
`Hypes` int DEFAULT NULL,
|
||||
`InvolvedCompanies` longtext DEFAULT NULL,
|
||||
`Keywords` longtext DEFAULT NULL,
|
||||
`MultiplayerModes` longtext DEFAULT NULL,
|
||||
`Name` varchar(255) DEFAULT NULL,
|
||||
`ParentGame` bigint DEFAULT NULL,
|
||||
`Platforms` longtext DEFAULT NULL,
|
||||
`PlayerPerspectives` longtext DEFAULT NULL,
|
||||
`Rating` double DEFAULT NULL,
|
||||
`RatingCount` int DEFAULT NULL,
|
||||
`ReleaseDates` longtext DEFAULT NULL,
|
||||
`Screenshots` longtext DEFAULT NULL,
|
||||
`SimilarGames` longtext DEFAULT NULL,
|
||||
`Slug` varchar(100) DEFAULT NULL,
|
||||
`StandaloneExpansions` longtext DEFAULT NULL,
|
||||
`Status` int DEFAULT NULL,
|
||||
`StoryLine` longtext,
|
||||
`Summary` longtext,
|
||||
`Tags` longtext DEFAULT NULL,
|
||||
`Themes` longtext DEFAULT NULL,
|
||||
`TotalRating` double DEFAULT NULL,
|
||||
`TotalRatingCount` int DEFAULT NULL,
|
||||
`UpdatedAt` datetime DEFAULT NULL,
|
||||
`Url` varchar(255) DEFAULT NULL,
|
||||
`VersionParent` bigint DEFAULT NULL,
|
||||
`VersionTitle` varchar(100) DEFAULT NULL,
|
||||
`Videos` longtext DEFAULT NULL,
|
||||
`Websites` longtext DEFAULT NULL,
|
||||
`dateAdded` datetime DEFAULT NULL,
|
||||
`lastUpdated` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
UNIQUE KEY `Id_UNIQUE` (`Id`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `Games_Roms`;
|
||||
CREATE TABLE `Games_Roms` (
|
||||
`Id` bigint NOT NULL AUTO_INCREMENT,
|
||||
`PlatformId` bigint DEFAULT NULL,
|
||||
`GameId` bigint DEFAULT NULL,
|
||||
`Name` varchar(255) DEFAULT NULL,
|
||||
`Size` bigint DEFAULT NULL,
|
||||
`CRC` varchar(20) DEFAULT NULL,
|
||||
`MD5` varchar(100) DEFAULT NULL,
|
||||
`SHA1` varchar(100) DEFAULT NULL,
|
||||
`DevelopmentStatus` varchar(100) DEFAULT NULL,
|
||||
`Flags` longtext DEFAULT NULL,
|
||||
`RomType` int DEFAULT NULL,
|
||||
`RomTypeMedia` varchar(100) DEFAULT NULL,
|
||||
`MediaLabel` varchar(100) DEFAULT NULL,
|
||||
`Path` longtext,
|
||||
`MetadataSource` int DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
UNIQUE KEY `Id_UNIQUE` (`Id`),
|
||||
INDEX `GameId` (`GameId` ASC) VISIBLE,
|
||||
INDEX `Id_GameId` (`GameId` ASC, `Id` ASC) VISIBLE
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `GameVideo`;
|
||||
CREATE TABLE `GameVideo` (
|
||||
`Id` bigint NOT NULL,
|
||||
`Checksum` varchar(45) DEFAULT NULL,
|
||||
`Game` bigint DEFAULT NULL,
|
||||
`Name` varchar(100) DEFAULT NULL,
|
||||
`VideoId` varchar(45) DEFAULT NULL,
|
||||
`dateAdded` datetime DEFAULT NULL,
|
||||
`lastUpdated` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `Genre`;
|
||||
CREATE TABLE `Genre` (
|
||||
`Id` bigint NOT NULL,
|
||||
`Checksum` varchar(45) DEFAULT NULL,
|
||||
`CreatedAt` datetime DEFAULT NULL,
|
||||
`UpdatedAt` datetime DEFAULT NULL,
|
||||
`Name` varchar(255) DEFAULT NULL,
|
||||
`Slug` varchar(100) DEFAULT NULL,
|
||||
`Url` varchar(255) DEFAULT NULL,
|
||||
`dateAdded` datetime DEFAULT NULL,
|
||||
`lastUpdated` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `InvolvedCompany`;
|
||||
CREATE TABLE `InvolvedCompany` (
|
||||
`Id` bigint NOT NULL,
|
||||
`Checksum` varchar(45) DEFAULT NULL,
|
||||
`Company` bigint DEFAULT NULL,
|
||||
`CreatedAt` datetime DEFAULT NULL,
|
||||
`Developer` tinyint(1) DEFAULT NULL,
|
||||
`Game` bigint DEFAULT NULL,
|
||||
`Porting` tinyint(1) DEFAULT NULL,
|
||||
`Publisher` tinyint(1) DEFAULT NULL,
|
||||
`Supporting` tinyint(1) DEFAULT NULL,
|
||||
`UpdatedAt` datetime DEFAULT NULL,
|
||||
`dateAdded` datetime DEFAULT NULL,
|
||||
`lastUpdated` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `Platform`;
|
||||
CREATE TABLE `Platform` (
|
||||
`Id` bigint NOT NULL,
|
||||
`Abbreviation` varchar(45) DEFAULT NULL,
|
||||
`AlternativeName` varchar(255) DEFAULT NULL,
|
||||
`Category` int DEFAULT NULL,
|
||||
`Checksum` varchar(45) DEFAULT NULL,
|
||||
`CreatedAt` datetime DEFAULT NULL,
|
||||
`Generation` int DEFAULT NULL,
|
||||
`Name` varchar(45) DEFAULT NULL,
|
||||
`PlatformFamily` bigint DEFAULT NULL,
|
||||
`PlatformLogo` bigint DEFAULT NULL,
|
||||
`Slug` varchar(45) DEFAULT NULL,
|
||||
`Summary` longtext,
|
||||
`UpdatedAt` datetime DEFAULT NULL,
|
||||
`Url` varchar(255) DEFAULT NULL,
|
||||
`Versions` longtext DEFAULT NULL,
|
||||
`Websites` longtext DEFAULT NULL,
|
||||
`dateAdded` datetime DEFAULT NULL,
|
||||
`lastUpdated` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
UNIQUE KEY `Id_UNIQUE` (`Id`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `PlatformLogo`;
|
||||
CREATE TABLE `PlatformLogo` (
|
||||
`Id` bigint NOT NULL,
|
||||
`AlphaChannel` tinyint(1) DEFAULT NULL,
|
||||
`Animated` tinyint(1) DEFAULT NULL,
|
||||
`Checksum` varchar(45) DEFAULT NULL,
|
||||
`Height` int DEFAULT NULL,
|
||||
`ImageId` varchar(45) DEFAULT NULL,
|
||||
`Url` varchar(255) DEFAULT NULL,
|
||||
`Width` int DEFAULT NULL,
|
||||
`dateAdded` datetime DEFAULT NULL,
|
||||
`lastUpdated` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `PlatformVersion`;
|
||||
CREATE TABLE `PlatformVersion` (
|
||||
`Id` bigint NOT NULL,
|
||||
`Checksum` varchar(45) DEFAULT NULL,
|
||||
`Companies` longtext DEFAULT NULL,
|
||||
`Connectivity` longtext,
|
||||
`CPU` longtext,
|
||||
`Graphics` longtext,
|
||||
`MainManufacturer` bigint DEFAULT NULL,
|
||||
`Media` longtext,
|
||||
`Memory` longtext,
|
||||
`Name` longtext,
|
||||
`OS` longtext,
|
||||
`Output` longtext,
|
||||
`PlatformLogo` int DEFAULT NULL,
|
||||
`PlatformVersionReleaseDates` longtext DEFAULT NULL,
|
||||
`Resolutions` longtext,
|
||||
`Slug` longtext,
|
||||
`Sound` longtext,
|
||||
`Storage` longtext,
|
||||
`Summary` longtext,
|
||||
`Url` varchar(255) DEFAULT NULL,
|
||||
`dateAdded` datetime DEFAULT NULL,
|
||||
`lastUpdated` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `Screenshot`;
|
||||
CREATE TABLE `Screenshot` (
|
||||
`Id` bigint NOT NULL,
|
||||
`AlphaChannel` tinyint(1) DEFAULT NULL,
|
||||
`Animated` tinyint(1) DEFAULT NULL,
|
||||
`Checksum` varchar(45) DEFAULT NULL,
|
||||
`Game` bigint DEFAULT NULL,
|
||||
`Height` int DEFAULT NULL,
|
||||
`ImageId` varchar(45) DEFAULT NULL,
|
||||
`Url` varchar(255) DEFAULT NULL,
|
||||
`Width` int DEFAULT NULL,
|
||||
`dateAdded` datetime DEFAULT NULL,
|
||||
`lastUpdated` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `Settings`;
|
||||
CREATE TABLE `Settings` (
|
||||
`Setting` varchar(45) NOT NULL,
|
||||
`Value` longtext,
|
||||
PRIMARY KEY (`Setting`),
|
||||
UNIQUE KEY `Setting_UNIQUE` (`Setting`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `Signatures_Games`;
|
||||
CREATE TABLE `Signatures_Games` (
|
||||
`Id` int NOT NULL AUTO_INCREMENT,
|
||||
`Name` varchar(255) DEFAULT NULL,
|
||||
`Description` varchar(255) DEFAULT NULL,
|
||||
`Year` varchar(15) DEFAULT NULL,
|
||||
`PublisherId` int DEFAULT NULL,
|
||||
`Demo` int DEFAULT NULL,
|
||||
`SystemId` int DEFAULT NULL,
|
||||
`SystemVariant` varchar(100) DEFAULT NULL,
|
||||
`Video` varchar(10) DEFAULT NULL,
|
||||
`Country` varchar(5) DEFAULT NULL,
|
||||
`Language` varchar(5) DEFAULT NULL,
|
||||
`Copyright` varchar(15) DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
UNIQUE KEY `Id_UNIQUE` (`Id`),
|
||||
KEY `publisher_Idx` (`PublisherId`),
|
||||
KEY `system_Idx` (`SystemId`),
|
||||
KEY `ingest_Idx` (`Name`,`Year`,`PublisherId`,`SystemId`,`Country`,`Language`) USING BTREE
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `Signatures_Platforms`;
|
||||
CREATE TABLE `Signatures_Platforms` (
|
||||
`Id` int NOT NULL AUTO_INCREMENT,
|
||||
`Platform` varchar(100) DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
UNIQUE KEY `IdSignatures_Platforms_UNIQUE` (`Id`),
|
||||
KEY `Platforms_Idx` (`Platform`,`Id`) USING BTREE
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `Signatures_Publishers`;
|
||||
CREATE TABLE `Signatures_Publishers` (
|
||||
`Id` int NOT NULL AUTO_INCREMENT,
|
||||
`Publisher` varchar(100) DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
UNIQUE KEY `Id_UNIQUE` (`Id`),
|
||||
KEY `publisher_Idx` (`Publisher`,`Id`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `Signatures_Roms`;
|
||||
CREATE TABLE `Signatures_Roms` (
|
||||
`Id` int NOT NULL AUTO_INCREMENT,
|
||||
`GameId` int DEFAULT NULL,
|
||||
`Name` varchar(255) DEFAULT NULL,
|
||||
`Size` bigint DEFAULT NULL,
|
||||
`CRC` varchar(20) DEFAULT NULL,
|
||||
`MD5` varchar(100) DEFAULT NULL,
|
||||
`SHA1` varchar(100) DEFAULT NULL,
|
||||
`DevelopmentStatus` varchar(100) DEFAULT NULL,
|
||||
`Flags` longtext DEFAULT NULL,
|
||||
`RomType` int DEFAULT NULL,
|
||||
`RomTypeMedia` varchar(100) DEFAULT NULL,
|
||||
`MediaLabel` varchar(100) DEFAULT NULL,
|
||||
`MetadataSource` int DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
UNIQUE KEY `Id_UNIQUE` (`Id`,`GameId`) USING BTREE,
|
||||
KEY `GameId_Idx` (`GameId`),
|
||||
KEY `md5_Idx` (`MD5`) USING BTREE,
|
||||
KEY `sha1_Idx` (`SHA1`) USING BTREE
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `Signatures_Sources`;
|
||||
CREATE TABLE `Signatures_Sources` (
|
||||
`Id` int NOT NULL AUTO_INCREMENT,
|
||||
`Name` varchar(255) DEFAULT NULL,
|
||||
`Description` varchar(255) DEFAULT NULL,
|
||||
`Category` varchar(45) DEFAULT NULL,
|
||||
`Version` varchar(45) DEFAULT NULL,
|
||||
`Author` varchar(255) DEFAULT NULL,
|
||||
`Email` varchar(45) DEFAULT NULL,
|
||||
`Homepage` varchar(45) DEFAULT NULL,
|
||||
`Url` varchar(45) DEFAULT NULL,
|
||||
`SourceType` varchar(45) DEFAULT NULL,
|
||||
`SourceMD5` varchar(45) DEFAULT NULL,
|
||||
`SourceSHA1` varchar(45) DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
UNIQUE KEY `Id_UNIQUE` (`Id`),
|
||||
KEY `sourcemd5_Idx` (`SourceMD5`,`Id`) USING BTREE,
|
||||
KEY `sourcesha1_Idx` (`SourceSHA1`,`Id`) USING BTREE
|
||||
);
|
||||
|
||||
DROP VIEW IF EXISTS `view_Signatures_Games`;
|
||||
CREATE VIEW `view_Signatures_Games` AS
|
||||
SELECT
|
||||
`Signatures_Games`.`Id` AS `Id`,
|
||||
`Signatures_Games`.`Name` AS `Name`,
|
||||
`Signatures_Games`.`Description` AS `Description`,
|
||||
`Signatures_Games`.`Year` AS `Year`,
|
||||
`Signatures_Games`.`PublisherId` AS `PublisherId`,
|
||||
`Signatures_Publishers`.`Publisher` AS `Publisher`,
|
||||
`Signatures_Games`.`Demo` AS `Demo`,
|
||||
`Signatures_Games`.`SystemId` AS `PlatformId`,
|
||||
`Signatures_Platforms`.`Platform` AS `Platform`,
|
||||
`Signatures_Games`.`SystemVariant` AS `SystemVariant`,
|
||||
`Signatures_Games`.`VIdeo` AS `Video`,
|
||||
`Signatures_Games`.`Country` AS `Country`,
|
||||
`Signatures_Games`.`Language` AS `Language`,
|
||||
`Signatures_Games`.`Copyright` AS `Copyright`
|
||||
FROM
|
||||
((`Signatures_Games`
|
||||
JOIN `Signatures_Publishers` ON ((`Signatures_Games`.`PublisherId` = `Signatures_Publishers`.`Id`)))
|
||||
JOIN `Signatures_Platforms` ON ((`Signatures_Games`.`SystemId` = `Signatures_Platforms`.`Id`)));
|
86
gaseous-server/Support/Database/MySQL/gaseous-1001.sql
Normal file
86
gaseous-server/Support/Database/MySQL/gaseous-1001.sql
Normal file
@@ -0,0 +1,86 @@
|
||||
DROP TABLE IF EXISTS `GameMode`;
|
||||
CREATE TABLE `GameMode` (
|
||||
`Id` BIGINT NOT NULL,
|
||||
`CreatedAt` DATETIME NULL,
|
||||
`Checksum` VARCHAR(45) NULL,
|
||||
`Name` VARCHAR(100) NULL,
|
||||
`Slug` VARCHAR(100) NULL,
|
||||
`UpdatedAt` DATETIME NULL,
|
||||
`Url` VARCHAR(255) NULL,
|
||||
`dateAdded` DATETIME NULL,
|
||||
`lastUpdated` DATETIME NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `MultiplayerMode`;
|
||||
CREATE TABLE `MultiplayerMode` (
|
||||
`Id` bigint NOT NULL,
|
||||
`CreatedAt` datetime DEFAULT NULL,
|
||||
`Checksum` varchar(45) DEFAULT NULL,
|
||||
`CampaignCoop` boolean DEFAULT NULL,
|
||||
`DropIn` boolean DEFAULT NULL,
|
||||
`Game` bigint DEFAULT NULL,
|
||||
`LanCoop` boolean DEFAULT NULL,
|
||||
`OfflineCoop` boolean DEFAULT NULL,
|
||||
`OfflineCoopMax` int DEFAULT NULL,
|
||||
`OfflineMax` int DEFAULT NULL,
|
||||
`OnlineCoop` boolean DEFAULT NULL,
|
||||
`OnlineCoopMax` int DEFAULT NULL,
|
||||
`OnlineMax` int DEFAULT NULL,
|
||||
`Platform` bigint DEFAULT NULL,
|
||||
`SplitScreen` boolean DEFAULT NULL,
|
||||
`SplitScreenOnline` boolean DEFAULT NULL,
|
||||
`UpdatedAt` datetime DEFAULT NULL,
|
||||
`dateAdded` datetime DEFAULT NULL,
|
||||
`lastUpdated` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `PlayerPerspective`;
|
||||
CREATE TABLE `PlayerPerspective` (
|
||||
`Id` bigint NOT NULL,
|
||||
`CreatedAt` datetime DEFAULT NULL,
|
||||
`Checksum` varchar(45) DEFAULT NULL,
|
||||
`Name` varchar(100) DEFAULT NULL,
|
||||
`Slug` varchar(45) DEFAULT NULL,
|
||||
`UpdatedAt` datetime DEFAULT NULL,
|
||||
`Url` varchar(255) DEFAULT NULL,
|
||||
`dateAdded` datetime DEFAULT NULL,
|
||||
`lastUpdated` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `Theme`;
|
||||
CREATE TABLE `Theme` (
|
||||
`Id` bigint NOT NULL,
|
||||
`CreatedAt` datetime DEFAULT NULL,
|
||||
`Checksum` varchar(45) DEFAULT NULL,
|
||||
`Name` varchar(100) DEFAULT NULL,
|
||||
`Slug` varchar(45) DEFAULT NULL,
|
||||
`UpdatedAt` datetime DEFAULT NULL,
|
||||
`Url` varchar(255) DEFAULT NULL,
|
||||
`dateAdded` datetime DEFAULT NULL,
|
||||
`lastUpdated` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS `RomCollections`;
|
||||
CREATE TABLE `RomCollections` (
|
||||
`Id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`Name` VARCHAR(255) NULL,
|
||||
`Description` LONGTEXT NULL,
|
||||
`Platforms` longtext NULL,
|
||||
`Genres` longtext NULL,
|
||||
`Players` longtext NULL,
|
||||
`PlayerPerspectives` longtext NULL,
|
||||
`Themes` longtext NULL,
|
||||
`MinimumRating` INT NULL,
|
||||
`MaximumRating` INT NULL,
|
||||
`MaximumRomsPerPlatform` INT NULL,
|
||||
`MaximumBytesPerPlatform` BIGINT NULL,
|
||||
`MaximumCollectionSizeInBytes` BIGINT NULL,
|
||||
`BuiltStatus` INT NULL,
|
||||
PRIMARY KEY (`Id`));
|
||||
|
||||
ALTER TABLE `Signatures_Sources`
|
||||
CHANGE COLUMN `Author` `Author` LONGTEXT NULL DEFAULT NULL ;
|
55
gaseous-server/Support/Database/MySQL/gaseous-1002.sql
Normal file
55
gaseous-server/Support/Database/MySQL/gaseous-1002.sql
Normal file
@@ -0,0 +1,55 @@
|
||||
ALTER TABLE `Signatures_Roms`
|
||||
ADD COLUMN `Attributes` longtext NULL AFTER `Flags`,
|
||||
ADD COLUMN `IngestorVersion` INT NULL DEFAULT 1;
|
||||
|
||||
ALTER TABLE `Games_Roms`
|
||||
ADD COLUMN `Attributes` longtext NULL AFTER `Flags`,
|
||||
ADD COLUMN `MetadataGameName` VARCHAR(255) NULL AFTER `MetadataSource`,
|
||||
ADD COLUMN `MetadataVersion` INT NULL DEFAULT 1;
|
||||
|
||||
ALTER TABLE `RomCollections`
|
||||
ADD COLUMN `FolderStructure` INT NULL DEFAULT 0 AFTER `MaximumCollectionSizeInBytes`,
|
||||
ADD COLUMN `IncludeBIOSFiles` BOOLEAN NULL DEFAULT 0 AFTER `FolderStructure`,
|
||||
ADD COLUMN `AlwaysInclude` longtext NULL AFTER `IncludeBIOSFiles`;
|
||||
|
||||
CREATE TABLE `PlatformMap` (
|
||||
`Id` BIGINT NOT NULL,
|
||||
`RetroPieDirectoryName` VARCHAR(45) NULL,
|
||||
`WebEmulator_Type` VARCHAR(45) NULL,
|
||||
`WebEmulator_Core` VARCHAR(45) NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
UNIQUE INDEX `Id_UNIQUE` (`Id` ASC) VISIBLE);
|
||||
|
||||
CREATE TABLE `PlatformMap_AlternateNames` (
|
||||
`Id` BIGINT NOT NULL,
|
||||
`Name` VARCHAR(255) NOT NULL,
|
||||
PRIMARY KEY (`Id`, `Name`));
|
||||
|
||||
CREATE TABLE `PlatformMap_Extensions` (
|
||||
`Id` BIGINT NOT NULL,
|
||||
`Extension` VARCHAR(45) NOT NULL,
|
||||
PRIMARY KEY (`Id`, `Extension`));
|
||||
|
||||
CREATE TABLE `PlatformMap_UniqueExtensions` (
|
||||
`Id` BIGINT NOT NULL,
|
||||
`Extension` VARCHAR(45) NOT NULL,
|
||||
PRIMARY KEY (`Id`, `Extension`));
|
||||
|
||||
CREATE TABLE `PlatformMap_Bios` (
|
||||
`Id` BIGINT NOT NULL,
|
||||
`Filename` VARCHAR(45) NOT NULL,
|
||||
`Description` LONGTEXT NOT NULL,
|
||||
`Hash` VARCHAR(45) NOT NULL,
|
||||
PRIMARY KEY (`Id`, `Filename`, `Hash`));
|
||||
|
||||
CREATE TABLE `ServerLogs` (
|
||||
`Id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`EventTime` DATETIME NOT NULL,
|
||||
`EventType` INT NOT NULL,
|
||||
`Process` VARCHAR(100) NOT NULL,
|
||||
`Message` LONGTEXT NOT NULL,
|
||||
`Exception` LONGTEXT NULL,
|
||||
PRIMARY KEY (`Id`));
|
||||
|
||||
ALTER TABLE `PlatformVersion`
|
||||
CHANGE COLUMN `PlatformLogo` `PlatformLogo` BIGINT NULL DEFAULT NULL ;
|
2
gaseous-server/Support/Database/MySQL/gaseous-1003.sql
Normal file
2
gaseous-server/Support/Database/MySQL/gaseous-1003.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `PlatformMap`
|
||||
ADD COLUMN `AvailableWebEmulators` longtext NULL;
|
54
gaseous-server/Support/Database/MySQL/gaseous-1004.sql
Normal file
54
gaseous-server/Support/Database/MySQL/gaseous-1004.sql
Normal file
@@ -0,0 +1,54 @@
|
||||
CREATE TABLE `GameLibraries` (
|
||||
`Id` int NOT NULL AUTO_INCREMENT,
|
||||
`Name` VARCHAR(255) NOT NULL,
|
||||
`Path` longtext NOT NULL,
|
||||
`DefaultLibrary` int NOT NULL DEFAULT '0',
|
||||
`DefaultPlatform` bigint NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`Id`)
|
||||
);
|
||||
|
||||
ALTER TABLE `Games_Roms`
|
||||
ADD COLUMN `LibraryId` INT NULL DEFAULT 0 AFTER `MetadataVersion`;
|
||||
|
||||
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