feat(db): add role field and role enum to users table schema
All checks were successful
Deploy Flowstate to VPS / deploy (push) Successful in 45s

This commit is contained in:
Chneemann 2026-08-21 03:55:57 +02:00
parent f3cb400d44
commit 6a6b8406a4
No known key found for this signature in database

View file

@ -36,6 +36,11 @@ export const taskPriorityEnum = pgEnum("task_priority", [
"high",
]);
/**
* Enumeration representing access control roles assigned to application users.
*/
export const userRoleEnum = pgEnum("user_role", ["admin", "member", "guest"]);
// ==========================================
// Tables
// ==========================================
@ -49,6 +54,7 @@ export const usersTable = pgTable("users", {
password: text("password").notNull(),
firstName: text("first_name").notNull(),
lastName: text("last_name").notNull(),
role: text("role").default("member").notNull(),
color: text("color").default("bg-indigo-500").notNull(),
lastLogin: timestamp("last_login"),
isOnline: boolean("is_online").default(false).notNull(),