fix: parity with vite-split

idk what to use
This commit is contained in:
trafficlunar 2026-04-22 11:45:54 +01:00
parent 5235efdd2e
commit aa631095fa
9 changed files with 37 additions and 137 deletions

View file

@ -3,5 +3,3 @@ ALTER TABLE "miis" ADD COLUMN "likeCount" INTEGER NOT NULL DEFAULT 0;
-- CreateIndex
CREATE INDEX "miis_likeCount_idx" ON "miis"("likeCount" DESC);
UPDATE miis SET "likeCount" = (SELECT COUNT(*) FROM likes WHERE likes."miiId" = miis.id);

View file

@ -0,0 +1,25 @@
/*
Warnings:
- You are about to drop the column `punishmentId` on the `miis` table. All the data in the column will be lost.
- You are about to drop the column `notes` on the `punishments` table. All the data in the column will be lost.
- You are about to drop the column `reasons` on the `punishments` table. All the data in the column will be lost.
- You are about to drop the `mii_punishments` table. If the table is not empty, all the data it contains will be lost.
- Added the required column `reason` to the `punishments` table without a default value. This is not possible if the table is not empty.
*/
-- DropForeignKey
ALTER TABLE "mii_punishments" DROP CONSTRAINT "mii_punishments_miiId_fkey";
-- DropForeignKey
ALTER TABLE "mii_punishments" DROP CONSTRAINT "mii_punishments_punishmentId_fkey";
-- AlterTable
ALTER TABLE "miis" DROP COLUMN "punishmentId";
-- AlterTable
ALTER TABLE "punishments" RENAME COLUMN "notes" TO "reason";
ALTER TABLE "punishments" DROP COLUMN "reasons";
-- DropTable
DROP TABLE "mii_punishments";