Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

feat: add payload to project_webhook (#12268)

p0ny60adfe50e117
diff --git a/backend/migrator/migration/prod/2.19/0001##project_webhook_payload.sql b/backend/migrator/migration/prod/2.19/0001##project_webhook_payload.sql
new file mode 100644
index 0000000000..3830d6523e
--- /dev/null
+++ b/backend/migrator/migration/prod/2.19/0001##project_webhook_payload.sql
@@ -0,0 +1 @@
+ALTER TABLE project_webhook ADD COLUMN payload JSONB NOT NULL DEFAULT '{}';
diff --git a/backend/migrator/migration/prod/LATEST.sql b/backend/migrator/migration/prod/LATEST.sql
index 720ac8d64b..4490478a49 100644
--- a/backend/migrator/migration/prod/LATEST.sql
+++ b/backend/migrator/migration/prod/LATEST.sql
@@ -249,7 +249,8 @@ CREATE TABLE project_webhook (
type TEXT NOT NULL CHECK (type LIKE 'bb.plugin.webhook.%'),
name TEXT NOT NULL,
url TEXT NOT NULL,
- activity_list TEXT ARRAY NOT NULL
+ activity_list TEXT ARRAY NOT NULL,
+ payload JSONB NOT NULL DEFAULT '{}'
);
CREATE INDEX idx_project_webhook_project_id ON project_webhook(project_id);
diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.go
index 04fa95fcb2..72ce8bc17a 100644
--- a/backend/migrator/migrator_test.go
+++ b/backend/migrator/migrator_test.go
@@ -230,5 +230,5 @@ func TestMigrationCompatibility(t *testing.T) {
func TestGetCutoffVersion(t *testing.T) {
releaseVersion, err := getProdCutoffVersion()
require.NoError(t, err)
- require.Equal(t, semver.MustParse("2.19.0"), releaseVersion)
+ require.Equal(t, semver.MustParse("2.19.1"), releaseVersion)
}