Commit Graph

8 Commits

Author SHA1 Message Date
binwiederhier
28a436c0d2 Optimizations 2026-02-23 14:11:36 -05:00
binwiederhier
b02366b42b Make more consistent 2026-02-23 13:49:54 -05:00
binwiederhier
811c7ae25a TX fixes 2026-02-22 20:39:41 -05:00
binwiederhier
850a9d4cc4 Fix bug with provisioned token removal 2026-02-22 20:28:37 -05:00
binwiederhier
35a54407a8 Manual review 2026-02-22 15:12:54 -05:00
binwiederhier
e3a402ed95 Make user tests work for postgres and sqlite 2026-02-17 20:14:45 -05:00
binwiederhier
909c3fe17b Add Store-level unit tests for SQLite and PostgreSQL backends
Add shared test functions in store_test.go covering all Store interface
operations (users, tokens, access control, tiers, billing, stats, etc.)
with per-backend wrappers in store_sqlite_test.go and store_postgres_test.go
following the webpush test pattern.

Fix broken isUniqueConstraintError() which used incorrect interface
assertions instead of string matching for SQLite/PostgreSQL errors.
2026-02-16 22:56:31 -05:00
binwiederhier
07c3e280bf Refactor user package to Store interface with PostgreSQL support
Extract database operations from Manager into a Store interface with
SQLite and PostgreSQL implementations using a shared commonStore.
Split SQLite migrations into store_sqlite_migrations.go, use shared
schema_version table for PostgreSQL, rename user_user/user_tier tables
to "user"/tier, and wire up database-url in CLI commands.
2026-02-16 22:39:54 -05:00