Versions in this module Expand all Collapse all v0 v0.13.1 Nov 29, 2026 v0.13.0 Nov 29, 2026 Changes in this version + func DailyPartitionName(table string, day time.Time) string + func NewModule(opts Options) appkit.Module + func ParsePartitionDate(relname string) (time.Time, bool) + func RetentionCutoff(now time.Time, retentionDays int) (time.Time, bool) + type MaintenancePlan struct + CreateSQL []string + CreatedNames []string + ExpireSQL []string + Schema string + Table string + func PlanTable(spec TableSpec, now time.Time, daysAhead int, existing []string) (MaintenancePlan, error) + type Options struct + DaysAhead int + Interval time.Duration + LockName string + LockPool *pgxpool.Pool + Log *slog.Logger + Now func() time.Time + Pool *pgxpool.Pool + RunOnStart bool + Tables []TableSpec + type Report struct + Tables []TableReport + func EnsurePartitions(ctx context.Context, pool *pgxpool.Pool, opts Options) (Report, error) + type RetentionAction string + const ActionDetach + const ActionDrop + const ActionKeep + type TableReport struct + Created int + Expired int + Schema string + SkippedReason string + Table string + type TableSpec struct + Action RetentionAction + PropagateTenantRLS bool + RetentionDays int + Schema string + Table string