mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 01:11:38 -05:00
34 lines
1.2 KiB
Python
34 lines
1.2 KiB
Python
"""empty message
|
|
|
|
Revision ID: 0041_platform_admin
|
|
Revises: 0040_add_reference
|
|
Create Date: 2016-03-16 16:33:15.279429
|
|
|
|
"""
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '0041_platform_admin'
|
|
down_revision = '0040_add_reference'
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
def upgrade():
|
|
### commands auto generated by Alembic - please adjust! ###
|
|
op.create_index(op.f('ix_notification_statistics_service_id'), 'notification_statistics', ['service_id'], unique=False)
|
|
op.drop_index('ix_service_notification_stats_service_id', table_name='notification_statistics')
|
|
op.add_column('users', sa.Column('platform_admin', sa.Boolean(), nullable=True, default=False))
|
|
op.get_bind()
|
|
op.execute('update users set platform_admin = False')
|
|
op.alter_column('users', 'platform_admin', nullable=False)
|
|
### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_column('users', 'platform_admin')
|
|
op.create_index('ix_service_notification_stats_service_id', 'notification_statistics', ['service_id'], unique=False)
|
|
op.drop_index(op.f('ix_notification_statistics_service_id'), table_name='notification_statistics')
|
|
### end Alembic commands ###
|