Harden PostgreSQL deploy: auto-rollback on SQL errors, clean DB on migrate.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -534,8 +534,9 @@ def sync_admin_from_env():
|
||||
set_setting("admin_password_hash", generate_password_hash(env_password))
|
||||
|
||||
|
||||
init_db()
|
||||
app.logger.info("数据库: %s", database_label())
|
||||
if os.getenv("QIHUO_SKIP_INIT_DB") != "1":
|
||||
init_db()
|
||||
app.logger.info("数据库: %s", database_label())
|
||||
|
||||
|
||||
def sync_ths_token():
|
||||
|
||||
Reference in New Issue
Block a user