User roles

This commit is contained in:
2026-03-10 23:29:13 +02:00
parent b361f46afa
commit e89d971f41
16 changed files with 325 additions and 197 deletions

View File

@@ -16,6 +16,11 @@ CREATE TABLE IF NOT EXISTS Users (
password TEXT NOT NULL,
added TEXT NOT NULL,
lastUpdated TEXT NOT NULL,
isAdmin INTEGER NOT NULL DEFAULT 0,
displayName TEXT NOT NULL DEFAULT ''
);
CREATE TABLE IF NOT EXISTS UserRoles (
userId INTEGER NOT NULL REFERENCES Users(id) ON DELETE CASCADE,
roleName TEXT NOT NULL,
PRIMARY KEY (userId, roleName)
);