This commit is contained in:
TheCactusBlue 2025-03-25 16:58:45 -07:00
parent 699e54e894
commit 68b3200637
2 changed files with 16 additions and 20 deletions

View File

@ -1,19 +0,0 @@
/*
Warnings:
- The values [USER] on the enum `PermissionScope` will be removed. If these variants are still used in the database, this will fail.
- You are about to drop the column `isDefaultUserPermission` on the `Permission` table. All the data in the column will be lost.
*/
-- AlterEnum
BEGIN;
CREATE TYPE "PermissionScope_new" AS ENUM ('PROJECT', 'TEAM');
ALTER TABLE "Permission" ALTER COLUMN "scope" TYPE "PermissionScope_new" USING ("scope"::text::"PermissionScope_new");
ALTER TYPE "PermissionScope" RENAME TO "PermissionScope_old";
ALTER TYPE "PermissionScope_new" RENAME TO "PermissionScope";
DROP TYPE "PermissionScope_old";
COMMIT;
-- AlterTable
ALTER TABLE "Permission" DROP COLUMN "isDefaultUserPermission",
ADD COLUMN "isDefaultProjectPermission" BOOLEAN NOT NULL DEFAULT false;

View File

@ -1,5 +1,20 @@
/*
Warnings:
- The values [USER] on the enum `PermissionScope` will be removed. If these variants are still used in the database, this will fail.
*/
-- AlterEnum
BEGIN;
CREATE TYPE "PermissionScope_new" AS ENUM ('PROJECT', 'TEAM');
ALTER TABLE "Permission" ALTER COLUMN "scope" TYPE "PermissionScope_new" USING ("scope"::text::"PermissionScope_new");
ALTER TYPE "PermissionScope" RENAME TO "PermissionScope_old";
ALTER TYPE "PermissionScope_new" RENAME TO "PermissionScope";
DROP TYPE "PermissionScope_old";
COMMIT;
-- AlterTable
ALTER TABLE "Permission" ADD COLUMN "isDefaultUserPermission" BOOLEAN NOT NULL DEFAULT false;
ALTER TABLE "Permission" ADD COLUMN "isDefaultProjectPermission" BOOLEAN NOT NULL DEFAULT false;
-- CreateTable
CREATE TABLE "ProjectUserDirectPermission" (