From 8951b8e7caf76e05e2f2fae14a314437a79949c1 Mon Sep 17 00:00:00 2001
From: Martin Korec <xkorec2@fi.muni.cz>
Date: Fri, 17 Jun 2022 04:15:40 +0200
Subject: [PATCH] fix: changed publishedAt to Int/number type

---
 .../migrations/20220617021322_init/migration.sql     | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 backend/prisma/migrations/20220617021322_init/migration.sql

diff --git a/backend/prisma/migrations/20220617021322_init/migration.sql b/backend/prisma/migrations/20220617021322_init/migration.sql
new file mode 100644
index 0000000..2a38dfe
--- /dev/null
+++ b/backend/prisma/migrations/20220617021322_init/migration.sql
@@ -0,0 +1,12 @@
+/*
+  Warnings:
+
+  - Changed the type of `publishedAt` on the `Movie` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
+
+*/
+-- AlterTable
+ALTER TABLE "Movie" DROP COLUMN "publishedAt",
+ADD COLUMN     "publishedAt" INTEGER NOT NULL;
+
+-- CreateIndex
+CREATE UNIQUE INDEX "Movie_originalName_publishedAt_directorId_key" ON "Movie"("originalName", "publishedAt", "directorId");
-- 
GitLab