mirror of https://github.com/langgenius/dify.git
fix: make `flask upgrade-db` fail on error (#32024)
(cherry picked from commit d9530f7bb7)
This commit is contained in:
parent
e9a7e8f77f
commit
1977e68b2d
|
|
@ -739,8 +739,10 @@ def upgrade_db():
|
|||
|
||||
click.echo(click.style("Database migration successful!", fg="green"))
|
||||
|
||||
except Exception:
|
||||
except Exception as e:
|
||||
logger.exception("Failed to execute database migration")
|
||||
click.echo(click.style(f"Database migration failed: {e}", fg="red"))
|
||||
raise SystemExit(1)
|
||||
finally:
|
||||
lock.release()
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue