mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-31 15:45:23 +00:00
feat: unify alerts into one plugin, channels, rules and inbox
This commit is contained in:
1 parent
fbe736bc20
commit
7c02daccf4
129 files changed
+20957
-2687
No files matched your search
@@ -0,0 +1,15 @@
|
||||
-- automations 0002: unlink_channels
|
||||
-- Hand-written: channels moved from core's notification_channels to the
|
||||
-- alerts plugin, so the link table drops its foreign key to the old table.
|
||||
-- The constraint's name differs between installs, so the table is rebuilt.
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `p_automations_channels_v2` (
|
||||
`id` int AUTO_INCREMENT PRIMARY KEY,
|
||||
`automation_id` int NOT NULL,
|
||||
`channel_id` int NOT NULL,
|
||||
FOREIGN KEY (`automation_id`) REFERENCES `p_automations_automations` (`id`) ON DELETE CASCADE
|
||||
);
|
||||
INSERT INTO `p_automations_channels_v2` (`id`, `automation_id`, `channel_id`) SELECT `id`, `automation_id`, `channel_id` FROM `p_automations_channels`;
|
||||
DROP TABLE `p_automations_channels`;
|
||||
RENAME TABLE `p_automations_channels_v2` TO `p_automations_channels`;
|
||||
CREATE UNIQUE INDEX `idx_automation_channels_pair` ON `p_automations_channels` (`automation_id`, `channel_id`);
|
||||
Reference in new issue
Block a user