🚧 wip: update media bulk insert for new schema

This commit is contained in:
2026-05-30 21:00:00 +07:00
parent 2faaeabf92
commit 1694035dc4
9 changed files with 157 additions and 72 deletions

View File

@ -0,0 +1,8 @@
/*
Warnings:
- A unique constraint covering the columns `[embed_url]` on the table `media_trailers` will be added. If there are existing duplicate values, this will fail.
*/
-- CreateIndex
CREATE UNIQUE INDEX "media_trailers_embed_url_key" ON "media_trailers"("embed_url");

View File

@ -0,0 +1,8 @@
/*
Warnings:
- A unique constraint covering the columns `[code]` on the table `countries` will be added. If there are existing duplicate values, this will fail.
*/
-- CreateIndex
CREATE UNIQUE INDEX "countries_code_key" ON "countries"("code");

View File

@ -0,0 +1,10 @@
/*
Warnings:
- You are about to drop the column `approver_id` on the `medias` table. All the data in the column will be lost.
- You are about to drop the column `created_by_id` on the `medias` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "medias" DROP COLUMN "approver_id",
DROP COLUMN "created_by_id";