mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-01 21:44:27 +00:00
feat(audit): change audit log action to string at db level and split file/folder actions
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
-- AlterEnum
|
||||
-- This migration adds more than one value to an enum.
|
||||
-- With PostgreSQL versions 11 and earlier, this is not possible
|
||||
-- in a single migration. This can be worked around by creating
|
||||
-- multiple migrations, each migration adding only one value to
|
||||
-- the enum.
|
||||
|
||||
|
||||
ALTER TYPE "AuditAction" ADD VALUE 'file_create';
|
||||
ALTER TYPE "AuditAction" ADD VALUE 'file_update';
|
||||
ALTER TYPE "AuditAction" ADD VALUE 'file_delete';
|
||||
ALTER TYPE "AuditAction" ADD VALUE 'folder_create';
|
||||
ALTER TYPE "AuditAction" ADD VALUE 'folder_update';
|
||||
ALTER TYPE "AuditAction" ADD VALUE 'folder_delete';
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "audit_logs" ALTER COLUMN "action" TYPE TEXT USING "action"::text;
|
||||
|
||||
-- DropEnum
|
||||
DROP TYPE "AuditAction";
|
||||
Reference in New Issue
Block a user