Add a mod manifest endpoint

This commit is contained in:
Lncvrt committed 2026-03-24 14:48:40 -07:00
1 parent 3d8153069d
commit aa296ab53d
4 files changed
+244 -3

No files matched your search

+57 -3
View File
@@ -3,9 +3,9 @@
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 14, 2026 at 12:08 AM
-- Server version: 11.8.6-MariaDB-log
-- PHP Version: 8.5.3
-- Generation Time: Mar 24, 2026 at 09:47 PM
-- Server version: 10.11.14-MariaDB-0ubuntu0.24.04.1
-- PHP Version: 8.3.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
@@ -104,6 +104,35 @@ CREATE TABLE `loaderupdates` (
-- --------------------------------------------------------
--
-- Table structure for table `mods`
--
CREATE TABLE `mods` (
`id` bigint(20) NOT NULL,
`name` text NOT NULL,
`description` text DEFAULT NULL,
`downloadCount` bigint(20) NOT NULL DEFAULT 0,
`hidden` tinyint(1) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPRESSED;
-- --------------------------------------------------------
--
-- Table structure for table `modversions`
--
CREATE TABLE `modversions` (
`id` text NOT NULL,
`downloads` text NOT NULL DEFAULT '{}',
`gameVersion` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
`releaseDate` bigint(20) NOT NULL,
`changelog` text DEFAULT NULL,
`hidden` tinyint(1) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPRESSED;
-- --------------------------------------------------------
--
-- Table structure for table `resetcodes`
--
@@ -185,6 +214,19 @@ ALTER TABLE `launcherversionmanifest`
ALTER TABLE `loaderupdates`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `mods`
--
ALTER TABLE `mods`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `modversions`
--
ALTER TABLE `modversions`
ADD PRIMARY KEY (`id`(255)),
ADD KEY `fk_gameVersion` (`gameVersion`);
--
-- Indexes for table `resetcodes`
--
@@ -219,6 +261,12 @@ ALTER TABLE `cdnfiles`
ALTER TABLE `games`
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `mods`
--
ALTER TABLE `mods`
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `resetcodes`
--
@@ -246,6 +294,12 @@ ALTER TABLE `verifycodes`
--
ALTER TABLE `launcherversionmanifest`
ADD CONSTRAINT `fk_category` FOREIGN KEY (`game`) REFERENCES `games` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `modversions`
--
ALTER TABLE `modversions`
ADD CONSTRAINT `fk_gameVersion` FOREIGN KEY (`gameVersion`) REFERENCES `launcherversionmanifest` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;