fix(proxy/utils.py): add script for adding MonthlyGlobalSpend view to the db

This commit is contained in:
Krrish Dholakia 2024-02-28 13:08:38 -08:00
parent 6a94ef6c16
commit 1f28867d20
12 changed files with 39 additions and 16 deletions

View file

@ -2315,7 +2315,6 @@ async def startup_event():
### CHECK IF VIEW EXISTS ###
if prisma_client is not None:
create_view_response = await prisma_client.check_view_exists()
print(f"create_view_response: {create_view_response}") # noqa
### START BUDGET SCHEDULER ###
if prisma_client is not None:
@ -4063,7 +4062,7 @@ async def global_spend_logs():
"""
global prisma_client
sql_query = """SELECT * FROM "globalspendperdate";"""
sql_query = """SELECT * FROM "MonthlyGlobalSpend";"""
response = await prisma_client.db.query_raw(query=sql_query)