version change because of other commits

This commit is contained in:
venusbb
2017-11-15 11:25:27 +00:00
parent fcfea6844d
commit e903257156

View File

@@ -1,7 +1,7 @@
""" """
Revision ID: 013_migrate_sms_allowance_data.py Revision ID: 0138_migrate_sms_allowance_data.py
Revises: 0135_stats_template_usage.py Revises: 0137_stats_template_usage.py
Create Date: 2017-11-10 21:42:59.715203 Create Date: 2017-11-10 21:42:59.715203
""" """
@@ -11,8 +11,8 @@ import uuid
from app.dao.date_util import get_current_financial_year_start_year from app.dao.date_util import get_current_financial_year_start_year
revision = '0136_migrate_sms_allowance_data' revision = '0138_migrate_sms_allowance_data'
down_revision = '0135_stats_template_usage' down_revision = '0137_notification_template_hist'
def upgrade(): def upgrade():
@@ -30,7 +30,7 @@ def upgrade():
insert_row_if_not_exist = """ insert_row_if_not_exist = """
INSERT INTO annual_billing INSERT INTO annual_billing
(id, service_id, financial_year_start, free_sms_fragment_limit, created_at, updated_at) (id, service_id, financial_year_start, free_sms_fragment_limit, created_at, updated_at)
SELECT uuid_in(md5(random()::text || now()::text)::cstring), id, {}, {}, '{}', '{}' SELECT uuid_in(md5(random()::text)::cstring), id, {}, {}, '{}', '{}'
FROM services WHERE id NOT IN FROM services WHERE id NOT IN
(select service_id from annual_billing) (select service_id from annual_billing)
""".format(current_year, default_limit, datetime.utcnow(), datetime.utcnow()) """.format(current_year, default_limit, datetime.utcnow(), datetime.utcnow())
@@ -46,4 +46,5 @@ def upgrade():
def downgrade(): def downgrade():
# There is no schema change. Only data migration and filling in gaps.
print('There is no action for downgrading to the previous version.') print('There is no action for downgrading to the previous version.')