zipline/prisma/migrations/20230115200747_rename_image_file/migration.sql
2023-01-15 13:39:07 -08:00

19 lines
No EOL
655 B
SQL

-- AlterEnum
ALTER TYPE "ImageFormat" RENAME TO "FileNameFormat";
-- AlterTable
ALTER TABLE "Image" RENAME TO "File";
-- AlterTable
ALTER TABLE "InvisibleImage" RENAME TO "InvisibleFile";
-- AlterTable
ALTER TABLE "InvisibleFile" RENAME COLUMN "imageId" TO "fileId";
-- AlterForeignKey
ALTER TABLE "InvisibleFile" RENAME CONSTRAINT "InvisibleImage_imageId_fkey" TO "InvisibleFile_fileId_fkey";
ALTER INDEX "InvisibleImage_imageId_key" RENAME TO "InvisibleFile_fileId_key";
-- AlterForeignKey
ALTER TABLE "InvisibleFile" RENAME CONSTRAINT "InvisibleImage_pkey" TO "InvisibleFile_pkey";
ALTER TABLE "File" RENAME CONSTRAINT "Image_pkey" TO "File_pkey";