mirror of
https://github.com/rommapp/romm.git
synced 2026-11-29 18:11:16 +01:00
automatic migrations when running the backend
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import uvicorn
|
||||
import alembic.config
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from fastapi_pagination import add_pagination
|
||||
@@ -39,5 +40,6 @@ def startup() -> None:
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
alembic.config.main(argv=["upgrade", "head"])
|
||||
uvicorn.run("main:app", host=DEV_HOST, port=DEV_PORT, reload=True)
|
||||
# uvicorn.run("main:app", host=DEV_HOST, port=DEV_PORT, reload=False, workers=2)
|
||||
|
||||
Reference in New Issue
Block a user