44 lines
1.7 KiB
Python
44 lines
1.7 KiB
Python
|
"""empty message
|
||
|
|
||
|
Revision ID: 5c63a89ee7b7
|
||
|
Revises: 9afbd55082a0
|
||
|
Create Date: 2021-09-29 10:24:20.413807
|
||
|
|
||
|
"""
|
||
|
from alembic import op
|
||
|
import sqlalchemy as sa
|
||
|
|
||
|
|
||
|
# revision identifiers, used by Alembic.
|
||
|
revision = '5c63a89ee7b7'
|
||
|
down_revision = '9afbd55082a0'
|
||
|
branch_labels = None
|
||
|
depends_on = None
|
||
|
|
||
|
|
||
|
def upgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.create_foreign_key(None, 'user', 'ldap_model', ['uid'], ['uid'])
|
||
|
op.drop_column('user', 'affiliation')
|
||
|
op.drop_column('user', 'email_address')
|
||
|
op.drop_column('user', 'eppn')
|
||
|
op.drop_column('user', 'title')
|
||
|
op.drop_column('user', 'first_name')
|
||
|
op.drop_column('user', 'last_name')
|
||
|
op.drop_column('user', 'display_name')
|
||
|
op.add_column('workflow_spec_category', sa.Column('admin', sa.Boolean(), nullable=True))
|
||
|
# ### end Alembic commands ###
|
||
|
|
||
|
|
||
|
def downgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.drop_column('workflow_spec_category', 'admin')
|
||
|
op.add_column('user', sa.Column('display_name', sa.VARCHAR(), autoincrement=False, nullable=True))
|
||
|
op.add_column('user', sa.Column('last_name', sa.VARCHAR(), autoincrement=False, nullable=True))
|
||
|
op.add_column('user', sa.Column('first_name', sa.VARCHAR(), autoincrement=False, nullable=True))
|
||
|
op.add_column('user', sa.Column('title', sa.VARCHAR(), autoincrement=False, nullable=True))
|
||
|
op.add_column('user', sa.Column('eppn', sa.VARCHAR(), autoincrement=False, nullable=True))
|
||
|
op.add_column('user', sa.Column('email_address', sa.VARCHAR(), autoincrement=False, nullable=True))
|
||
|
op.add_column('user', sa.Column('affiliation', sa.VARCHAR(), autoincrement=False, nullable=True))
|
||
|
# ### end Alembic commands ###
|