remove flask creating the db and let sqlalchemy handle it (#78)
taylor_socfortress committed
Jul 27, 2023 at 07:45 UTC
ea1d21cc8209a0c9e4191bab0b646fbe94d7ac60
2 files changed
+1
-4
backend/app/__init__.py
+1
@@ -29,6 +29,7 @@ CORS(app)
29
app.config.from_object("settings")
30
31
db = SQLAlchemy(app)
32
+
33
ma = Marshmallow(app)
34
from app.models import agents # noqa: F401
35
from app.models import artifacts # noqa: F401
backend/copilot.py
-4
@@ -2,7 +2,6 @@
2
from loguru import logger
3
4
from app import app
5
-from app import db
5
6
logger.add(
7
"debug.log",
@@ -13,8 +12,5 @@ logger.add(
12
)
13
logger.debug("Starting CoPilot...")
14
16
-with app.app_context():
17
- db.create_all()
18
-
15
if __name__ == "__main__":
16
app.run(debug=True)