Skip to content

Fix: migrate users.hashed_password to nullable for OIDC user creation#91

Merged
hunter-read merged 1 commit into
mainfrom
90-oidc-error-voidauth-sqlite3integrityerror-not-null-constraint-failed-usershashed_password
May 20, 2026
Merged

Fix: migrate users.hashed_password to nullable for OIDC user creation#91
hunter-read merged 1 commit into
mainfrom
90-oidc-error-voidauth-sqlite3integrityerror-not-null-constraint-failed-usershashed_password

Conversation

@hunter-read
Copy link
Copy Markdown
Owner

Summary

Existing deployments had hashed_password NOT NULL (pre-OIDC schema). SQLAlchemy's create_all doesn't alter existing tables, so OIDC auto-register failed with an IntegrityError when creating passwordless users. Adds a startup
migration that detects the constraint via PRAGMA table_info and recreates the users table using SQLite's copy-rename pattern to drop it.

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Docs / configuration only

Testing

  • Backend tests pass (pytest -q)
  • Frontend tests pass (npm test)
  • Tested manually in the browser

@hunter-read hunter-read merged commit ac0b46b into main May 20, 2026
5 checks passed
@hunter-read hunter-read deleted the 90-oidc-error-voidauth-sqlite3integrityerror-not-null-constraint-failed-usershashed_password branch May 20, 2026 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OIDC error (VoidAuth): sqlite3.IntegrityError: NOT NULL constraint failed: users.hashed_password

1 participant