feat: Working on storage modal in database page in order to add multiple backend storages. Adding a system to manage independently channels from organizations and from system admin.

This commit is contained in:
charlesgauthereau
2026-01-14 21:54:13 +01:00
parent d8e9e2dac3
commit 91f25bc25d
32 changed files with 7663 additions and 461 deletions
@@ -0,0 +1,16 @@
CREATE TYPE "public"."backup_storage_status" AS ENUM('pending', 'success', 'failed');--> statement-breakpoint
CREATE TABLE "backup_storage" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"backup_id" uuid NOT NULL,
"storage_channel_id" uuid NOT NULL,
"status" "backup_storage_status" DEFAULT 'pending' NOT NULL,
"path" text,
"size" integer,
"checksum" text,
"updated_at" timestamp,
"created_at" timestamp DEFAULT now() NOT NULL,
"deleted_at" timestamp
);
--> statement-breakpoint
ALTER TABLE "backup_storage" ADD CONSTRAINT "backup_storage_backup_id_backups_id_fk" FOREIGN KEY ("backup_id") REFERENCES "public"."backups"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "backup_storage" ADD CONSTRAINT "backup_storage_storage_channel_id_storage_channel_id_fk" FOREIGN KEY ("storage_channel_id") REFERENCES "public"."storage_channel"("id") ON DELETE cascade ON UPDATE no action;
@@ -0,0 +1,2 @@
ALTER TABLE "storage_channel" ADD COLUMN "organization_id" uuid;--> statement-breakpoint
ALTER TABLE "storage_channel" ADD CONSTRAINT "storage_channel_organization_id_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;
@@ -0,0 +1,2 @@
ALTER TABLE "notification_channel" ADD COLUMN "organization_id" uuid;--> statement-breakpoint
ALTER TABLE "notification_channel" ADD CONSTRAINT "notification_channel_organization_id_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+21
View File
@@ -155,6 +155,27 @@
"when": 1768337434929,
"tag": "0021_soft_blockbuster",
"breakpoints": true
},
{
"idx": 22,
"version": "7",
"when": 1768379186747,
"tag": "0022_purple_retro_girl",
"breakpoints": true
},
{
"idx": 23,
"version": "7",
"when": 1768412730102,
"tag": "0023_common_the_captain",
"breakpoints": true
},
{
"idx": 24,
"version": "7",
"when": 1768412750113,
"tag": "0024_lush_blindfold",
"breakpoints": true
}
]
}