Skip to content

A continuation of HomeBox the inventory and organization system built for the Home User

Fix flip flopped columns

Matthew Kilgore3a7744099686
diff --git a/backend/internal/data/migrations/sqlite3/20251226154700_fix_roles_and_superuser.sql b/backend/internal/data/migrations/sqlite3/20251226154700_fix_roles_and_superuser.sql
new file mode 100644
index 00000000..12cda88f
--- /dev/null
+++ b/backend/internal/data/migrations/sqlite3/20251226154700_fix_roles_and_superuser.sql
@@ -0,0 +1,4 @@
+-- +goose Up
+-- Force the role and superuser flags, previous nullable password migration (prior to v0.22.2)
+-- caused them to flip-flop during migration for some users.
+UPDATE users SET role = 'owner', is_superuser = 0, superuser = 0;