store: add users table and user_id scoping to migrations
Schema-only step toward per-user profile isolation: profile/workout_kinds/ sync_state are rebuilt to drop their singleton constraints, activities/ sync_runs gain a nullable user_id column. Store methods are scoped in later tasks.
This commit is contained in:
6
backend/internal/store/migrations/0021_users_table.sql
Normal file
6
backend/internal/store/migrations/0021_users_table.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
CREATE TABLE users (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
oidc_sub TEXT NOT NULL UNIQUE,
|
||||
display_name TEXT NOT NULL,
|
||||
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
||||
);
|
||||
Reference in New Issue
Block a user