mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[bugfix] Fix update users query in migration (#3963)
This commit is contained in:
@@ -81,12 +81,13 @@ func init() {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set instance app
|
// Set instance app ID on
|
||||||
// ID on all users.
|
// users where it's null.
|
||||||
if _, err := tx.
|
if _, err := tx.
|
||||||
NewUpdate().
|
NewUpdate().
|
||||||
Table("users").
|
Table("users").
|
||||||
Set("? = ?", bun.Ident("created_by_application_id"), instanceAppID).
|
Set("? = ?", bun.Ident("created_by_application_id"), instanceAppID).
|
||||||
|
Where("? IS NULL", bun.Ident("created_by_application_id")).
|
||||||
Exec(ctx); err != nil {
|
Exec(ctx); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user