Initial commit for sqlalchemy2.0 migration

This commit is contained in:
Aditi Anand
2024-03-13 12:42:11 -04:00
parent 158316a77b
commit 385ec3583f
23 changed files with 1694 additions and 1590 deletions

View File

@@ -24,7 +24,8 @@ def upgrade():
op.add_column("monthly_billing", sa.Column("start_date", sa.DateTime))
op.add_column("monthly_billing", sa.Column("end_date", sa.DateTime))
conn = op.get_bind()
results = conn.execute("Select id, month, year from monthly_billing")
query = text("SELECT id, month, year FROM monthly_billing")
results = conn.execute(query)
res = results.fetchall()
for x in res:
start_date, end_date = get_month_start_and_end_date_in_utc(