This commit is contained in:
2026-07-20 22:01:44 +08:00 Unverified
parent 76a1b66f53
commit 1287544c41
17 changed files with 777 additions and 21 deletions
+8
View File
@@ -53,6 +53,10 @@ export const sqliteSchema = `
class_id TEXT REFERENCES school_classes(id) ON DELETE SET NULL,
active INTEGER NOT NULL DEFAULT 1 CHECK (active IN (0, 1)),
must_change_password INTEGER NOT NULL DEFAULT 0 CHECK (must_change_password IN (0, 1)),
totp_enabled INTEGER NOT NULL DEFAULT 0 CHECK (totp_enabled IN (0, 1)),
totp_secret_encrypted TEXT,
totp_recovery_codes TEXT NOT NULL DEFAULT '[]',
totp_last_used_step INTEGER,
archived_at TEXT,
archived_by TEXT REFERENCES users(id) ON DELETE RESTRICT,
display_name TEXT NOT NULL,
@@ -538,6 +542,10 @@ export const mysqlSchema = [
class_id VARCHAR(64) NULL,
active BOOLEAN NOT NULL DEFAULT TRUE,
must_change_password BOOLEAN NOT NULL DEFAULT FALSE,
totp_enabled BOOLEAN NOT NULL DEFAULT FALSE,
totp_secret_encrypted VARCHAR(512) NULL,
totp_recovery_codes VARCHAR(2048) NOT NULL DEFAULT '[]',
totp_last_used_step BIGINT NULL,
archived_at VARCHAR(35) NULL,
archived_by VARCHAR(64) NULL,
display_name VARCHAR(100) NOT NULL,