Working on implementation of alert policies. Some refactoring in user profile and patching a bug in status endpoint api.

This commit is contained in:
charlesgauthereau
2025-11-28 23:10:37 +01:00
parent d968aa9c16
commit 934e635cdb
29 changed files with 3364 additions and 1551 deletions
@@ -0,0 +1,3 @@
ALTER TABLE "alert_policy" DROP CONSTRAINT "alert_policy_notification_channel_id_notification_channel_id_fk";
--> statement-breakpoint
ALTER TABLE "alert_policy" ADD CONSTRAINT "alert_policy_notification_channel_id_notification_channel_id_fk" FOREIGN KEY ("notification_channel_id") REFERENCES "public"."notification_channel"("id") ON DELETE cascade ON UPDATE no action;
File diff suppressed because it is too large Load Diff
+7
View File
@@ -64,6 +64,13 @@
"when": 1763914207236,
"tag": "0008_aberrant_scorpion",
"breakpoints": true
},
{
"idx": 9,
"version": "7",
"when": 1764364481615,
"tag": "0009_lucky_edwin_jarvis",
"breakpoints": true
}
]
}
+1 -1
View File
@@ -12,7 +12,7 @@ export const alertPolicy = pgTable('alert_policy', {
id: uuid('id').defaultRandom().primaryKey(),
notificationChannelId: uuid('notification_channel_id')
.notNull()
.references(() => notificationChannel.id, {onDelete: 'restrict'}),
.references(() => notificationChannel.id, {onDelete: 'cascade'}),
eventKinds: eventKindEnum("event_kind").array().notNull(),
enabled: boolean('enabled').default(true).notNull(),
databaseId: uuid('database_id')