core: agent users (#1727)

This commit is contained in:
JRoberts
2023-01-13 13:54:07 +04:00
committed by GitHub
parent 7323bb4333
commit 424328b9d1
17 changed files with 132 additions and 61 deletions
+2 -1
View File
@@ -29,7 +29,8 @@ CREATE TABLE users(
local_display_name TEXT NOT NULL UNIQUE,
active_user INTEGER NOT NULL DEFAULT 0,
created_at TEXT CHECK(created_at NOT NULL),
updated_at TEXT CHECK(updated_at NOT NULL), -- 1 for active user
updated_at TEXT CHECK(updated_at NOT NULL),
agent_user_id INTEGER CHECK(agent_user_id NOT NULL), -- 1 for active user
FOREIGN KEY(user_id, local_display_name)
REFERENCES display_names(user_id, local_display_name)
ON DELETE CASCADE