Skip to content

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

fix bugs from previous commit b689758bf9472a2e463f198709eb2b1c86da7009 [formerly 139ee02d64274a45f62562cf3557761b843f1626] [formerly 9eead33056c6b7e7ff63e54a8dbccdacdf8793c0 [formerly de0c08b654e4e5d2cb71dc66e9ff008aa59c0c67]] (#41)

p0ny3da050cf5bd8
diff --git a/api/backup.go b/api/backup.go
index 01292246e2..a43e9691a9 100644
--- a/api/backup.go
+++ b/api/backup.go
@@ -163,7 +163,7 @@ type BackupSetting struct {
Hour int `jsonapi:"attr,hour"`
DayOfWeek int `jsonapi:"attr,dayOfWeek"`
// HookURL is the callback url to be requested (using HTTP GET) after a successful backup.
- HookURL string `jsonapi:"attr,hook_url"`
+ HookURL string `jsonapi:"attr,hookURL"`
}
// BackupSettingFind is the message to get a backup settings.
@@ -192,7 +192,7 @@ type BackupSettingUpsert struct {
Enabled bool `jsonapi:"attr,enabled"`
Hour int `jsonapi:"attr,hour"`
DayOfWeek int `jsonapi:"attr,dayOfWeek"`
- HookURL string `jsonapi:"attr,hook_url"`
+ HookURL string `jsonapi:"attr,hookURL"`
}
// BackupSettingsMatch is the message to find backup settings matching the conditions.
diff --git a/frontend/src/components/DatabaseBackupPanel.vue b/frontend/src/components/DatabaseBackupPanel.vue
index 1bf2b780d4..9035dc0d0a 100644
--- a/frontend/src/components/DatabaseBackupPanel.vue
+++ b/frontend/src/components/DatabaseBackupPanel.vue
@@ -313,6 +313,7 @@ export default {
? -1
: dayOfWeek
: state.autoBackupDayOfWeek,
+ hookURL: "",
};
store
.dispatch("backup/upsertBackupSetting", {
diff --git a/store/backup.go b/store/backup.go
index dc61d02d20..5188ca8000 100644
--- a/store/backup.go
+++ b/store/backup.go
@@ -421,7 +421,7 @@ func (s *BackupService) UpsertBackupSettingTx(ctx context.Context, tx *sql.Tx, u
ON CONFLICT(database_id) DO UPDATE SET
enabled = excluded.enabled,
hour = excluded.hour,
- day_of_week = excluded.day_of_week
+ day_of_week = excluded.day_of_week,
hook_url = excluded.hook_url
RETURNING id, creator_id, created_ts, updater_id, updated_ts, database_id, `+"`enabled`,"+` `+"hour, day_of_week"+`, hook_url
`,