Working sorting kinda?

This commit is contained in:
2025-07-26 19:00:19 +02:00
parent 3c0e191cd9
commit ef281ef70f
21 changed files with 586 additions and 169 deletions

View File

@ -0,0 +1,30 @@
/*
Warnings:
- You are about to drop the column `index` on the `PortfolioSortContext` table. All the data in the column will be lost.
- You are about to drop the column `key` on the `PortfolioSortContext` table. All the data in the column will be lost.
- A unique constraint covering the columns `[imageId,year,albumId,type,group]` on the table `PortfolioSortContext` will be added. If there are existing duplicate values, this will fail.
- Added the required column `albumId` to the `PortfolioSortContext` table without a default value. This is not possible if the table is not empty.
- Added the required column `group` to the `PortfolioSortContext` table without a default value. This is not possible if the table is not empty.
- Added the required column `sortOrder` to the `PortfolioSortContext` table without a default value. This is not possible if the table is not empty.
- Added the required column `type` to the `PortfolioSortContext` table without a default value. This is not possible if the table is not empty.
- Added the required column `year` to the `PortfolioSortContext` table without a default value. This is not possible if the table is not empty.
*/
-- DropIndex
DROP INDEX "PortfolioSortContext_key_imageId_key";
-- DropIndex
DROP INDEX "PortfolioSortContext_key_index_idx";
-- AlterTable
ALTER TABLE "PortfolioSortContext" DROP COLUMN "index",
DROP COLUMN "key",
ADD COLUMN "albumId" TEXT NOT NULL,
ADD COLUMN "group" TEXT NOT NULL,
ADD COLUMN "sortOrder" INTEGER NOT NULL,
ADD COLUMN "type" TEXT NOT NULL,
ADD COLUMN "year" TEXT NOT NULL;
-- CreateIndex
CREATE UNIQUE INDEX "PortfolioSortContext_imageId_year_albumId_type_group_key" ON "PortfolioSortContext"("imageId", "year", "albumId", "type", "group");