Skip to content

Commit

Permalink
fix commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth Kehl committed Oct 21, 2024
1 parent f4f6312 commit 261ea6f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions migrations/versions/0044_jobs_to_notification_hist.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ def upgrade():
#
# go_live = datetime.datetime.strptime('2016-05-18', '%Y-%m-%d')
# notifications_history_start_date = datetime.datetime.strptime('2016-06-26 23:21:55', '%Y-%m-%d %H:%M:%S')
# jobs = session.query(Job).join(Template).filter(Job.service_id == '95316ff0-e555-462d-a6e7-95d26fbfd091',
# stmt = select(Job).join(Template).filter(Job.service_id == '95316ff0-e555-462d-a6e7-95d26fbfd091',
# Job.created_at >= go_live,
# Job.created_at < notifications_history_start_date).all()
#
# jobs = db.session.execute(stmt).scalars().all()
# for job in jobs:
# for i in range(0, job.notifications_delivered):
# notification = NotificationHistory(id=uuid.uuid4(),
Expand Down Expand Up @@ -76,12 +76,11 @@ def downgrade():
#
# go_live = datetime.datetime.strptime('2016-05-18', '%Y-%m-%d')
# notifications_history_start_date = datetime.datetime.strptime('2016-06-26 23:21:55', '%Y-%m-%d %H:%M:%S')
#
# session.query(NotificationHistory).filter(
# stmt = delete(NotificationHistory).where(
# NotificationHistory.created_at >= go_live,
# NotificationHistory.service_id == '95316ff0-e555-462d-a6e7-95d26fbfd091',
# NotificationHistory.created_at < notifications_history_start_date).delete()
#
# NotificationHistory.created_at < notifications_history_start_date)
# session.execute(stmt)
# session.commit()
# ### end Alembic commands ###
pass

0 comments on commit 261ea6f

Please sign in to comment.