mirror of
https://github.com/KingHWJ/WeReadBoard.git
synced 2026-11-03 18:24:58 +08:00
feat(auth): 增加登录验证和五天会话
This commit is contained in:
1 parent
ecd16bcefc
commit
810b52a051
14 files changed
+467
-20
No files matched your search
@@ -73,14 +73,13 @@ import pymysql
|
||||
|
||||
from reading_api import MYSQL_CONFIG
|
||||
|
||||
migration = Path("migrations/001_reading_goals.sql")
|
||||
if migration.exists():
|
||||
with pymysql.connect(**MYSQL_CONFIG) as conn:
|
||||
with conn.cursor() as cur:
|
||||
with pymysql.connect(**MYSQL_CONFIG) as conn:
|
||||
with conn.cursor() as cur:
|
||||
for migration in sorted(Path("migrations").glob("*.sql")):
|
||||
for sql in migration.read_text(encoding="utf-8").split(";"):
|
||||
if sql.strip():
|
||||
cur.execute(sql)
|
||||
conn.commit()
|
||||
conn.commit()
|
||||
PY
|
||||
|
||||
echo "[5/5] 重启服务 $SERVICE_NAME"
|
||||
|
||||
Reference in new issue
Block a user