diff --git a/alembic/versions/1cd0a853c697_add_closed_at_field_in_pr.py b/alembic/versions/1cd0a853c697_add_closed_at_field_in_pr.py index 0ecf8b3..d6eef26 100644 --- a/alembic/versions/1cd0a853c697_add_closed_at_field_in_pr.py +++ b/alembic/versions/1cd0a853c697_add_closed_at_field_in_pr.py @@ -27,6 +27,9 @@ def upgrade(): ) ) + op.execute('''UPDATE "pull_requests" SET closed_at=date_created ''' + '''WHERE STATUS != 'Open';''') + def downgrade(): ''' Remove the column closed_at from the table pull_requests.