Remove comment about role column in users table
Removed unnecessary comment about ensuring 'role' column in users table.
This commit is contained in:
parent
76686a0cec
commit
a09aa1ef50
1 changed files with 0 additions and 4 deletions
|
|
@ -39,10 +39,6 @@ if (dbVersion === 0) {
|
||||||
console.log("Updated database to version 1.");
|
console.log("Updated database to version 1.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Ensure `role` column exists on users table.
|
|
||||||
* This works for both fresh installs and existing DBs, without touching user_version.
|
|
||||||
*/
|
|
||||||
const userColumns = db.query("PRAGMA table_info(users)").all() as { name: string }[];
|
const userColumns = db.query("PRAGMA table_info(users)").all() as { name: string }[];
|
||||||
const hasRoleColumn = userColumns.some((col) => col.name === "role");
|
const hasRoleColumn = userColumns.some((col) => col.name === "role");
|
||||||
if (!hasRoleColumn) {
|
if (!hasRoleColumn) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue