cr-connect-workflow/migrations/versions/13424d5a6de8_.py

43 lines
1.3 KiB
Python

"""empty message
Revision ID: 13424d5a6de8
Revises: 5064b72284b7
Create Date: 2020-06-02 18:17:29.990159
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '13424d5a6de8'
down_revision = '5064b72284b7'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('ldap_model',
sa.Column('uid', sa.String(), nullable=False),
sa.Column('display_name', sa.String(), nullable=True),
sa.Column('given_name', sa.String(), nullable=True),
sa.Column('email_address', sa.String(), nullable=True),
sa.Column('telephone_number', sa.String(), nullable=True),
sa.Column('title', sa.String(), nullable=True),
sa.Column('department', sa.String(), nullable=True),
sa.Column('affiliation', sa.String(), nullable=True),
sa.Column('sponsor_type', sa.String(), nullable=True),
sa.Column('date_cached', sa.DateTime(timezone=True), nullable=True),
sa.PrimaryKeyConstraint('uid')
)
op.add_column('approval', sa.Column('date_approved', sa.DateTime(timezone=True), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('approval', 'date_approved')
op.drop_table('ldap_model')
# ### end Alembic commands ###