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.
This commit is contained in:
Sybren A. Stüvel 2023-07-10 13:56:47 +02:00
parent 6a170a3ae4
commit 60d54eabb3

View File

@ -27,7 +27,7 @@ type Worker struct {
LastSeenAt time.Time `gorm:"index"` // Should contain UTC timestamps. LastSeenAt time.Time `gorm:"index"` // Should contain UTC timestamps.
StatusRequested api.WorkerStatus `gorm:"type:varchar(16);default:''"` 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. SupportedTaskTypes string `gorm:"type:varchar(255);default:''"` // comma-separated list of task types.