Files
Containr/app/backend/migrations_goose/20260919000000_database_backup_schedule.sql
Tomas Dvorak 08d92fb10f feat(backups): scheduled database backups via cron tick
- database_services gains backup_schedule + next_backup_at (goose migration,
  sqlc schema, new queries).
- PUT /databases/:id accepts backup_schedule — validated cron expression,
  empty string disables; invalid returns 400.
- Cron scheduler tick now also folds due databases into the existing
  snapshot pipeline (createBackupProcess).
- Databases page backups section gets a schedule row showing current expr
  and next run.
- resolveBackupConfig reports real next_backup/enabled instead of a fake
  last+24h estimate.
- Verified e2e: '* * * * *' produced three consecutive completed archives
  containing the seeded payload; invalid schedule rejected.

Authored By: TDvorak <[email protected]>
2026-09-17 17:46:02 +02:00

10 lines
327 B
SQL

-- +goose Up
ALTER TABLE public.database_services
ADD COLUMN IF NOT EXISTS backup_schedule character varying(100),
ADD COLUMN IF NOT EXISTS next_backup_at timestamp with time zone;
-- +goose Down
ALTER TABLE public.database_services
DROP COLUMN IF EXISTS backup_schedule,
DROP COLUMN IF EXISTS next_backup_at;