feat(slack-integration): add support for secret sync error notifications and enhance notification handling

This commit is contained in:
Victor Santos
2025-10-24 18:04:51 -03:00
parent abd4cb6217
commit ecca51b1d6
10 changed files with 367 additions and 121 deletions
@@ -0,0 +1,29 @@
import { Knex } from "knex";
export async function up(knex: Knex): Promise<void> {
if (!(await knex.schema.hasColumn("project_slack_configs", "isSecretSyncErrorNotificationEnabled"))) {
await knex.schema.alterTable("project_slack_configs", (table) => {
table.boolean("isSecretSyncErrorNotificationEnabled").notNullable().defaultTo(false);
});
}
if (!(await knex.schema.hasColumn("project_slack_configs", "secretSyncErrorChannels"))) {
await knex.schema.alterTable("project_slack_configs", (table) => {
table.text("secretSyncErrorChannels").notNullable().defaultTo("");
});
}
}
export async function down(knex: Knex): Promise<void> {
if (await knex.schema.hasColumn("project_slack_configs", "isSecretSyncErrorNotificationEnabled")) {
await knex.schema.alterTable("project_slack_configs", (table) => {
table.dropColumn("isSecretSyncErrorNotificationEnabled");
});
}
if (await knex.schema.hasColumn("project_slack_configs", "secretSyncErrorChannels")) {
await knex.schema.alterTable("project_slack_configs", (table) => {
table.dropColumn("secretSyncErrorChannels");
});
}
}