mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
done
This commit is contained in:
parent
699e54e894
commit
68b3200637
@ -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;
|
||||
@ -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" (
|
||||
Loading…
Reference in New Issue
Block a user