check ci if default false works in mssql

This commit is contained in:
Christopher Homberger 2025-03-05 14:40:55 +01:00
parent 9f546abc38
commit b7a31515cc
2 changed files with 3 additions and 9 deletions

View File

@ -58,7 +58,7 @@ type ActionRunner struct {
// Store labels defined in state file (default: .runner file) of `act_runner`
AgentLabels []string `xorm:"TEXT"`
// Store if this is a runner that only ever get one single job assigned
Ephemeral bool `xorm:"ephemeral"`
Ephemeral bool `xorm:"ephemeral NOT NULL DEFAULT false"`
Created timeutil.TimeStamp `xorm:"created"`
Updated timeutil.TimeStamp `xorm:"updated"`

View File

@ -9,14 +9,8 @@ import (
func AddEphemeralToActionRunner(x *xorm.Engine) error {
type ActionRunner struct {
Ephemeral bool `xorm:"ephemeral"`
Ephemeral bool `xorm:"ephemeral NOT NULL DEFAULT false"`
}
if err := x.Sync(new(ActionRunner)); err != nil {
return err
}
// update all records to set ephemeral to false
_, err := x.Exec("UPDATE `action_runner` SET `ephemeral` = false WHERE `ephemeral` IS NULL")
return err
return x.Sync(new(ActionRunner))
}