Commit e12b034
committed
feat(db): implement migration framework and add profile management
- Introduced a new `migrations` module to handle database schema migrations.
- Added baseline schema creation and several migration functions to update existing tables.
- Enhanced the `initialize` function to apply migrations on database initialization.
- Implemented profile management with the ability to switch profiles and migrate legacy databases.
- Updated `UsageGoal` model to include `notify_risk` field with default value.
- Modified database queries to accommodate new columns and structures.
- Added new API endpoints for profile management and migration status checks.1 parent 45d8b4c commit e12b034
9 files changed
Lines changed: 1814 additions & 73 deletions
File tree
- src-tauri
- src
- commands
- db
- models
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
10 | 21 | | |
11 | 22 | | |
12 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
| 253 | + | |
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| |||
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
0 commit comments