fix and update

This commit is contained in:
lendry
2026-07-07 10:14:37 +03:00
parent 29306eb2ec
commit bd6cd0d798
22 changed files with 1544 additions and 53 deletions

View File

@@ -0,0 +1,33 @@
-- CreateEnum
CREATE TYPE "AppReleasePlatform" AS ENUM ('ANDROID', 'WINDOWS');
-- CreateTable
CREATE TABLE "AppRelease" (
"id" TEXT NOT NULL,
"platform" "AppReleasePlatform" NOT NULL,
"version" TEXT NOT NULL,
"versionCode" INTEGER NOT NULL,
"fileName" TEXT NOT NULL,
"storageKey" TEXT NOT NULL,
"fileSize" BIGINT NOT NULL,
"sha256" TEXT NOT NULL,
"releaseNotes" TEXT,
"isPublished" BOOLEAN NOT NULL DEFAULT true,
"createdById" TEXT,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "AppRelease_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "AppRelease_storageKey_key" ON "AppRelease"("storageKey");
-- CreateIndex
CREATE UNIQUE INDEX "AppRelease_platform_version_key" ON "AppRelease"("platform", "version");
-- CreateIndex
CREATE UNIQUE INDEX "AppRelease_platform_versionCode_key" ON "AppRelease"("platform", "versionCode");
-- CreateIndex
CREATE INDEX "AppRelease_platform_isPublished_createdAt_idx" ON "AppRelease"("platform", "isPublished", "createdAt");