mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-13 08:12:40 +10:00
Store overhaul (#142)
* feat: small library tweaks + company page * feat: new store view * fix: ci merge error * feat: add genres to store page * feat: sorting * feat: lock game/version imports while their tasks are running * feat: feature games * feat: tag based filtering * fix: make tags alphabetical * refactor: move a bunch of i18n to common * feat: add localizations for everything * fix: title description on panel * fix: feature carousel text * fix: i18n footer strings * feat: add tag page * fix: develop merge * feat: offline games support (don't error out if provider throws) * feat: tag management * feat: show library next to game import + small fixes * feat: most of the company and tag managers * feat: company text field editing * fix: small fixes + tsgo experiemental * feat: upload icon and banner * feat: store infinite scrolling and bulk import mode * fix: lint * fix: add drop-base to prettier ignore
This commit is contained in:
@ -0,0 +1,5 @@
|
||||
-- CreateEnum
|
||||
CREATE TYPE "Genre" AS ENUM ('Action', 'Strategy', 'Sports', 'Adventure', 'Roleplay', 'Racing', 'Simulation', 'Educational', 'Fighting', 'Shooter', 'RealTimeStrategy', 'CardGame', 'BoardGame', 'Compilation', 'MMORPG', 'MinigameCollection', 'Puzzle', 'MusicRhythm');
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "Game" ADD COLUMN "genres" "Genre"[];
|
||||
@ -0,0 +1,14 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- The values [RealTimeStrategy,CardGame,BoardGame,MinigameCollection,MusicRhythm] on the enum `Genre` will be removed. If these variants are still used in the database, this will fail.
|
||||
|
||||
*/
|
||||
-- AlterEnum
|
||||
BEGIN;
|
||||
CREATE TYPE "Genre_new" AS ENUM ('Action', 'Strategy', 'Sports', 'Adventure', 'Roleplay', 'Racing', 'Simulation', 'Educational', 'Fighting', 'Shooter', 'RTS', 'Card', 'Board', 'Compilation', 'MMORPG', 'Minigames', 'Puzzle', 'Rhythm');
|
||||
ALTER TABLE "Game" ALTER COLUMN "genres" TYPE "Genre_new"[] USING ("genres"::text::"Genre_new"[]);
|
||||
ALTER TYPE "Genre" RENAME TO "Genre_old";
|
||||
ALTER TYPE "Genre_new" RENAME TO "Genre";
|
||||
DROP TYPE "Genre_old";
|
||||
COMMIT;
|
||||
@ -0,0 +1,2 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "Game" ADD COLUMN "featured" BOOLEAN NOT NULL DEFAULT false;
|
||||
11
prisma/migrations/20250721061200_remove_genres/migration.sql
Normal file
11
prisma/migrations/20250721061200_remove_genres/migration.sql
Normal file
@ -0,0 +1,11 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `genres` on the `Game` table. All the data in the column will be lost.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "Game" DROP COLUMN "genres";
|
||||
|
||||
-- DropEnum
|
||||
DROP TYPE "Genre";
|
||||
@ -0,0 +1,5 @@
|
||||
-- Add pg_trgm
|
||||
CREATE EXTENSION pg_trgm;
|
||||
|
||||
-- Create index for tag names
|
||||
-- CREATE INDEX trgm_tag_name ON "Tag" USING GIST (name gist_trgm_ops(siglen=32));
|
||||
@ -0,0 +1,2 @@
|
||||
-- CreateIndex
|
||||
CREATE INDEX "Tag_name_idx" ON "Tag" USING GIST ("name" gist_trgm_ops(siglen=32));
|
||||
@ -0,0 +1,87 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the `Tag` table. If the table is not empty, all the data it contains will be lost.
|
||||
- You are about to drop the `_ArticleToTag` table. If the table is not empty, all the data it contains will be lost.
|
||||
- You are about to drop the `_GameToTag` table. If the table is not empty, all the data it contains will be lost.
|
||||
|
||||
*/
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "_ArticleToTag" DROP CONSTRAINT "_ArticleToTag_A_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "_ArticleToTag" DROP CONSTRAINT "_ArticleToTag_B_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "_GameToTag" DROP CONSTRAINT "_GameToTag_A_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "_GameToTag" DROP CONSTRAINT "_GameToTag_B_fkey";
|
||||
|
||||
-- DropTable
|
||||
DROP TABLE "Tag";
|
||||
|
||||
-- DropTable
|
||||
DROP TABLE "_ArticleToTag";
|
||||
|
||||
-- DropTable
|
||||
DROP TABLE "_GameToTag";
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "GameTag" (
|
||||
"id" TEXT NOT NULL,
|
||||
"name" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "GameTag_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "NewsTag" (
|
||||
"id" TEXT NOT NULL,
|
||||
"name" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "NewsTag_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "_GameToGameTag" (
|
||||
"A" TEXT NOT NULL,
|
||||
"B" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "_GameToGameTag_AB_pkey" PRIMARY KEY ("A","B")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "_ArticleToNewsTag" (
|
||||
"A" TEXT NOT NULL,
|
||||
"B" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "_ArticleToNewsTag_AB_pkey" PRIMARY KEY ("A","B")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "GameTag_name_key" ON "GameTag"("name");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "GameTag_name_idx" ON "GameTag" USING GIST ("name" gist_trgm_ops(siglen=32));
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "NewsTag_name_key" ON "NewsTag"("name");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "_GameToGameTag_B_index" ON "_GameToGameTag"("B");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "_ArticleToNewsTag_B_index" ON "_ArticleToNewsTag"("B");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "_GameToGameTag" ADD CONSTRAINT "_GameToGameTag_A_fkey" FOREIGN KEY ("A") REFERENCES "Game"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "_GameToGameTag" ADD CONSTRAINT "_GameToGameTag_B_fkey" FOREIGN KEY ("B") REFERENCES "GameTag"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "_ArticleToNewsTag" ADD CONSTRAINT "_ArticleToNewsTag_A_fkey" FOREIGN KEY ("A") REFERENCES "Article"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "_ArticleToNewsTag" ADD CONSTRAINT "_ArticleToNewsTag_B_fkey" FOREIGN KEY ("B") REFERENCES "NewsTag"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
Reference in New Issue
Block a user