From 60d54eabb308bb900cee63db66917f0a9376179c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 10 Jul 2023 13:56:47 +0200 Subject: [PATCH] Manager: avoid recreation of Worker table at startup Mark the default value of `Worker.LazyStatusRequest` as `false`. The previous default was configured as `0`, which was different enough to always trigger a database migration of that column. However, since these values do map to each other, the migration didn't do anything concrete, and would be triggered again at the next startup. --- internal/manager/persistence/workers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/manager/persistence/workers.go b/internal/manager/persistence/workers.go index 4fe25431..0b9e6359 100644 --- a/internal/manager/persistence/workers.go +++ b/internal/manager/persistence/workers.go @@ -27,7 +27,7 @@ type Worker struct { LastSeenAt time.Time `gorm:"index"` // Should contain UTC timestamps. StatusRequested api.WorkerStatus `gorm:"type:varchar(16);default:''"` - LazyStatusRequest bool `gorm:"type:smallint;default:0"` + LazyStatusRequest bool `gorm:"type:smallint;default:false"` SupportedTaskTypes string `gorm:"type:varchar(255);default:''"` // comma-separated list of task types.