Blame alembic/versions/1a510f2216c0_add_the__block_users_field.py
|
Pierre-Yves Chibon |
2de085 |
"""Add the _block_users field
|
|
Pierre-Yves Chibon |
2de085 |
|
|
Pierre-Yves Chibon |
2de085 |
Revision ID: 1a510f2216c0
|
|
Pierre-Yves Chibon |
2de085 |
Revises: 003fcd9e8860
|
|
Pierre-Yves Chibon |
2de085 |
Create Date: 2019-03-14 12:24:32.139377
|
|
Pierre-Yves Chibon |
2de085 |
|
|
Pierre-Yves Chibon |
2de085 |
"""
|
|
Pierre-Yves Chibon |
2de085 |
|
|
Pierre-Yves Chibon |
2de085 |
from alembic import op
|
|
Pierre-Yves Chibon |
2de085 |
import sqlalchemy as sa
|
|
Pierre-Yves Chibon |
2de085 |
|
|
Pierre-Yves Chibon |
2de085 |
|
|
Pierre-Yves Chibon |
2de085 |
# revision identifiers, used by Alembic.
|
|
Pierre-Yves Chibon |
2de085 |
revision = '1a510f2216c0'
|
|
Pierre-Yves Chibon |
2de085 |
down_revision = '003fcd9e8860'
|
|
Pierre-Yves Chibon |
2de085 |
|
|
Pierre-Yves Chibon |
2de085 |
|
|
Pierre-Yves Chibon |
2de085 |
def upgrade():
|
|
Pierre-Yves Chibon |
2de085 |
''' Add the column _block_users to the table projects.
|
|
Pierre-Yves Chibon |
2de085 |
'''
|
|
Pierre-Yves Chibon |
2de085 |
op.add_column(
|
|
Pierre-Yves Chibon |
2de085 |
'projects',
|
|
Pierre-Yves Chibon |
2de085 |
sa.Column('_block_users', sa.Text, nullable=True)
|
|
Pierre-Yves Chibon |
2de085 |
)
|
|
Pierre-Yves Chibon |
2de085 |
|
|
Pierre-Yves Chibon |
2de085 |
|
|
Pierre-Yves Chibon |
2de085 |
def downgrade():
|
|
Pierre-Yves Chibon |
2de085 |
''' Drop the column _block_users from the table projects.
|
|
Pierre-Yves Chibon |
2de085 |
'''
|
|
Pierre-Yves Chibon |
2de085 |
op.drop_column('projects', '_block_users')
|