39 lines
1.1 KiB
Python
39 lines
1.1 KiB
Python
"""empty message
|
|
|
|
Revision ID: cb892916166a
|
|
Revises: ff29528a9909
|
|
Create Date: 2021-02-24 12:16:45.779821
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'cb892916166a'
|
|
down_revision = 'ff29528a9909'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('study_associated_user',
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
sa.Column('study_id', sa.Integer(), nullable=False),
|
|
sa.Column('uid', sa.String(), nullable=False),
|
|
sa.Column('role', sa.String(), nullable=True),
|
|
sa.Column('send_email', sa.Boolean(), nullable=True),
|
|
sa.Column('access', sa.Boolean(), nullable=True),
|
|
sa.ForeignKeyConstraint(['study_id'], ['study.id'], ),
|
|
sa.ForeignKeyConstraint(['uid'], ['ldap_model.uid'], ),
|
|
sa.PrimaryKeyConstraint('id')
|
|
)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table('study_associated_user')
|
|
# ### end Alembic commands ###
|