Commit graph

6 commits

Author SHA1 Message Date
Till Wegmueller
dd3dd4ef31
fix: Rename device_code table to device_codes
The DeriveIden macro converted DeviceCode to device_code (singular),
but the SeaORM entity expects device_codes (plural). Adds a migration
to rename the table so queries match.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 18:02:22 +01:00
Till Wegmueller
badb5dd18e
Implement device flow and client autoregistration
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2026-01-06 22:24:09 +01:00
Till Wegmueller
3f2a30cf97
format code
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2026-01-06 16:50:22 +01:00
Till Wegmueller
0fcd924105
Implement consent workflow
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2026-01-06 16:49:49 +01:00
Till Wegmueller
d7bdd51164
WIP Passkey implementation. Needs fixing storage.rs and more tests
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2025-12-07 13:18:22 +01:00
Till Wegmueller
b6bf4ceee0
feat: migrate from raw SQL to SeaORM migrations
Replace raw SQL CREATE TABLE statements with proper SeaORM migration
system. This eliminates verbose SQL logs on startup and provides
proper migration tracking and rollback support.

Changes:
- Add sea-orm-migration dependency and migration crate
- Create initial migration (m20250101_000001) with all 8 tables
- Update storage::init() to only connect to database
- Run migrations automatically in main.rs on startup
- Remove unused detect_backend() function and imports

The migration system properly handles both SQLite and PostgreSQL
backends with appropriate type handling (e.g., BIGSERIAL vs INTEGER
for auto-increment columns).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 21:42:58 +01:00