diff options
| author | 2025-04-02 12:39:38 +0200 | |
|---|---|---|
| committer | 2025-04-02 12:39:38 +0200 | |
| commit | 57c5f68e1a6182c0fa476359742d15182f0a95cb (patch) | |
| tree | f898b9d44f025552b108e778a0a6ad002acc0dfd /internal/db/bundb | |
| parent | [chore] bump golang.org/x/net@v0.38.0, github.com/gin-contrib/cors@v1.7.4, gi... (diff) | |
| download | gotosocial-57c5f68e1a6182c0fa476359742d15182f0a95cb.tar.xz | |
[bugfix] Fix update users query in migration (#3963)
Diffstat (limited to 'internal/db/bundb')
| -rw-r--r-- | internal/db/bundb/migrations/20250310144102_application_management.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/db/bundb/migrations/20250310144102_application_management.go b/internal/db/bundb/migrations/20250310144102_application_management.go index 46ff9926b..e20cd2921 100644 --- a/internal/db/bundb/migrations/20250310144102_application_management.go +++ b/internal/db/bundb/migrations/20250310144102_application_management.go @@ -81,12 +81,13 @@ func init() { return err } - // Set instance app - // ID on all users. + // Set instance app ID on + // users where it's null. if _, err := tx. NewUpdate(). Table("users"). Set("? = ?", bun.Ident("created_by_application_id"), instanceAppID). + Where("? IS NULL", bun.Ident("created_by_application_id")). Exec(ctx); err != nil { return err } |
