mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-10 07:12:20 -05:00
The API rate limit will be removed from the config and added to services so that it is possible to change the rate_limit for individual services in rare cases. Pivotal story: https://www.pivotaltracker.com/story/show/153992529
24 lines
630 B
Python
24 lines
630 B
Python
"""
|
|
|
|
Revision ID: 0157_add_rate_limit_to_service
|
|
Revises: 0156_set_temp_letter_contact
|
|
Create Date: 2018-01-08 16:13:25.733336
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
revision = '0157_add_rate_limit_to_service'
|
|
down_revision = '0156_set_temp_letter_contact'
|
|
|
|
|
|
def upgrade():
|
|
op.add_column('services', sa.Column('rate_limit', sa.Integer(), nullable=False, server_default='3000'))
|
|
op.add_column('services_history', sa.Column('rate_limit', sa.Integer(), nullable=False, server_default='3000'))
|
|
|
|
|
|
def downgrade():
|
|
op.drop_column('services_history', 'rate_limit')
|
|
op.drop_column('services', 'rate_limit')
|