docserver/sql/users.sql

28 lines
940 B
MySQL
Raw Normal View History

2023-07-19 03:00:41 +00:00
DROP TABLE users;
CREATE TABLE IF NOT EXISTS users
(
id INTEGER PRIMARY KEY NOT NULL,
name TEXT NOT NULL,
fullname TEXT NOT NULL,
email TEXT NOT NULL,
description TEXT NOT NULL,
password TEXT NOT NULL,
otp_enabled BOOLEAN FALSE,
otp_verified BOOLEAN FALSE,
otp_base32 TEXT NOT NULL,
otp_auth_url TEXT NOT NULL,
otp_defs TEXT NOT NULL,
roles TEXT NOT NULL,
created TEXT NOT NULL,
lastaccess TEXT NOT NULL,
status TEXT NOT NULL,
items TEXT NOT NULL,
isadmin BOOLEAN FALSE
);
CREATE UNIQUE INDEX idx_users_email
ON users (email);
CREATE UNIQUE INDEX idx_users_fullname
ON users (name);