Blame alembic/versions/5bb80aeb238d_refuse_sessions_before.py

Pierre-Yves Chibon 0557c1
"""refuse_sessions_before
Pierre-Yves Chibon 0557c1
Pierre-Yves Chibon 0557c1
Revision ID: 5bb80aeb238d
Pierre-Yves Chibon 0557c1
Revises: 7f31a9fad89f
Pierre-Yves Chibon 0557c1
Create Date: 2018-05-03 16:39:34.974914
Pierre-Yves Chibon 0557c1
Pierre-Yves Chibon 0557c1
"""
Pierre-Yves Chibon 0557c1
Pierre-Yves Chibon 0557c1
# revision identifiers, used by Alembic.
Pierre-Yves Chibon 0557c1
revision = '5bb80aeb238d'
Pierre-Yves Chibon 0557c1
down_revision = '7f31a9fad89f'
Pierre-Yves Chibon 0557c1
Pierre-Yves Chibon 0557c1
from alembic import op
Pierre-Yves Chibon 0557c1
import sqlalchemy as sa
Pierre-Yves Chibon 0557c1
Pierre-Yves Chibon 0557c1
Pierre-Yves Chibon 0557c1
def upgrade():
Pierre-Yves Chibon 0557c1
    ''' Add the column _reports to the table projects
Pierre-Yves Chibon 0557c1
    '''
Pierre-Yves Chibon 0557c1
    op.add_column(
Pierre-Yves Chibon 0557c1
        'users',
Pierre-Yves Chibon 0557c1
        sa.Column(
Pierre-Yves Chibon 0557c1
            'refuse_sessions_before', sa.DateTime, nullable=True,
Pierre-Yves Chibon 0557c1
            server_default=None)
Pierre-Yves Chibon 0557c1
    )
Pierre-Yves Chibon 0557c1
Pierre-Yves Chibon 0557c1
Pierre-Yves Chibon 0557c1
def downgrade():
Pierre-Yves Chibon 0557c1
    ''' Drop the column _reports from the table projects.
Pierre-Yves Chibon 0557c1
    '''
Pierre-Yves Chibon 0557c1
    op.drop_column('users', 'refuse_sessions_before')