mirror of https://github.com/langgenius/dify.git
fix: make `flask upgrade-db` fail on error (#32024)
This commit is contained in:
parent
b24e6edada
commit
d9530f7bb7
|
|
@ -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