Update the valid_from date for the rate that is intended to start at the begining of the financial year.

It was the start of the financial year in BST, needed to convert it to UTC.
Small change to the logic to find the rates.
This commit is contained in:
Rebecca Law
2017-05-03 17:11:48 +01:00
parent 64ef843777
commit 93e76d2362
3 changed files with 42 additions and 7 deletions

View File

@@ -0,0 +1,24 @@
"""empty message
Revision ID: 0080_fix_rate_start_date
Revises: 0079_update_rates
Create Date: 2017-05-03 16:50:11.334116
"""
# revision identifiers, used by Alembic.
revision = '0080_fix_rate_start_date'
down_revision = '0079_update_rates'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.get_bind()
op.execute("UPDATE RATES SET valid_from = '2017-03-31 23:00:00' WHERE valid_from = '2017-04-01 00:00:00'")
def downgrade():
op.get_bind()
op.execute("UPDATE RATES SET valid_from = '2017-03-31 23:00:00' WHERE valid_from = '2017-04-01 00:00:00'")