Update App/app.py
Browse files- App/app.py +4 -2
App/app.py
CHANGED
@@ -19,11 +19,13 @@ async def startup_event():
|
|
19 |
app.state.models = models
|
20 |
|
21 |
try:
|
|
|
22 |
# print(type(database.url), database_url)
|
23 |
await models.create_all()
|
24 |
await models._create_all(str(database.url))
|
25 |
-
|
26 |
-
|
|
|
27 |
finally:
|
28 |
print(database.is_connected)
|
29 |
if not database.is_connected:
|
|
|
19 |
app.state.models = models
|
20 |
|
21 |
try:
|
22 |
+
print("creating tables")
|
23 |
# print(type(database.url), database_url)
|
24 |
await models.create_all()
|
25 |
await models._create_all(str(database.url))
|
26 |
+
print("created")
|
27 |
+
except Exception e:
|
28 |
+
print("failed to create",e)
|
29 |
finally:
|
30 |
print(database.is_connected)
|
31 |
if not database.is_connected:
|