mirror of
https://github.com/spchcap/speech.capital.git
synced 2026-01-14 08:38:42 +00:00
Feat: Add user roles for admin/owner powers
This commit is contained in:
@@ -2,6 +2,7 @@ const schema = [
|
|||||||
`CREATE TABLE IF NOT EXISTS users (
|
`CREATE TABLE IF NOT EXISTS users (
|
||||||
id INTEGER PRIMARY KEY,
|
id INTEGER PRIMARY KEY,
|
||||||
username TEXT UNIQUE NOT NULL,
|
username TEXT UNIQUE NOT NULL,
|
||||||
|
role TEXT NOT NULL DEFAULT 'user' CHECK(role IN ('user', 'admin', 'owner')),
|
||||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||||
);`,
|
);`,
|
||||||
`CREATE TABLE IF NOT EXISTS subs (
|
`CREATE TABLE IF NOT EXISTS subs (
|
||||||
|
|||||||
Reference in New Issue
Block a user