mirror of
https://github.com/GSA/notifications-api.git
synced 2026-06-01 20:08:27 -04:00
Merge branch 'master' of https://github.com/alphagov/notifications-api into vb-callback-seperate-queue
This commit is contained in:
24
migrations/versions/0152_kill_service_free_fragments.py
Normal file
24
migrations/versions/0152_kill_service_free_fragments.py
Normal file
@@ -0,0 +1,24 @@
|
||||
"""
|
||||
|
||||
Revision ID: 0152_kill_service_free_fragments
|
||||
Revises: 0151_refactor_letter_rates
|
||||
Create Date: 2017-12-01 16:49:51.178455
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
revision = '0152_kill_service_free_fragments'
|
||||
down_revision = '0151_refactor_letter_rates'
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('services', 'free_sms_fragment_limit')
|
||||
op.drop_column('services_history', 'free_sms_fragment_limit')
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('services_history', sa.Column('free_sms_fragment_limit', sa.BIGINT(), autoincrement=False, nullable=True))
|
||||
op.add_column('services', sa.Column('free_sms_fragment_limit', sa.BIGINT(), autoincrement=False, nullable=True))
|
||||
@@ -26,7 +26,7 @@ notifications-python-client==4.6.0
|
||||
awscli==1.14.4
|
||||
awscli-cwlogs>=1.4,<1.5
|
||||
|
||||
git+https://github.com/alphagov/notifications-utils.git@23.3.1#egg=notifications-utils==23.3.1
|
||||
git+https://github.com/alphagov/notifications-utils.git@23.3.4#egg=notifications-utils==23.3.4
|
||||
|
||||
git+https://github.com/alphagov/boto.git@2.43.0-patch3#egg=boto==2.43.0-patch3
|
||||
|
||||
|
||||
@@ -46,8 +46,11 @@ def reorder_revisions(revisions, old_base, new_base):
|
||||
file_data = rev_file.read()
|
||||
|
||||
file_data = file_data.replace(head.revision, new_revision_id).replace(old_base, new_base)
|
||||
new_filename = head.path.replace(head.revision, new_revision_id)
|
||||
|
||||
with open(head.path.replace(head.revision, new_revision_id), 'w') as rev_file:
|
||||
assert head.path != new_filename, 'Old filename not same as revision id, please rename file before continuing'
|
||||
|
||||
with open(new_filename, 'w') as rev_file:
|
||||
rev_file.write(file_data)
|
||||
|
||||
print("Removing {}".format(head.path))
|
||||
|
||||
Reference in New Issue
Block a user