check / check (push) Successful in 3m56s
The webhook page opens with a statistics pane: entrypoints and targets, deliveries in progress, the last arrival, the retention period; events, deliveries and failures, lifetime and within retention; and events, failures and failure percentage over 10 minutes and 24 hours. Running totals, one row per target plus one for events, sit in each webhook's event database and are written in the same transaction as the rows they count; retention prunes in paused, stoppable batches and subtracts what it removes. Window figures are index-range counts on a new finished_at column. An existing event database must be recreated. Model: opus-5-5
18 lines
463 B
Go
18 lines
463 B
Go
package database
|
|
|
|
// Migrate runs database migrations for the main application database.
|
|
// Only configuration-tier models are stored in the main database.
|
|
// Event-tier models (Event, Delivery, DeliveryResult, EventTotals,
|
|
// TargetTotals) live in
|
|
// per-webhook dedicated databases managed by WebhookDBManager.
|
|
func (d *Database) Migrate() error {
|
|
return d.db.AutoMigrate(
|
|
&Setting{},
|
|
&User{},
|
|
&APIKey{},
|
|
&Webhook{},
|
|
&Entrypoint{},
|
|
&Target{},
|
|
)
|
|
}
|