mirror of
https://github.com/sartography/protocol-builder-mock.git
synced 2025-01-12 16:54:25 +00:00
50 lines
1.6 KiB
Python
50 lines
1.6 KiB
Python
"""empty message
|
|
|
|
Revision ID: ffba4886d280
|
|
Revises: d3592c4e8a39
|
|
Create Date: 2020-08-12 14:06:05.072787
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'ffba4886d280'
|
|
down_revision = 'd3592c4e8a39'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('sponsor',
|
|
sa.Column('SPONSOR_ID', sa.Integer(), nullable=False),
|
|
sa.Column('SP_NAME', sa.String(), nullable=True),
|
|
sa.Column('SP_MAILING_ADDRESS', sa.String(), nullable=True),
|
|
sa.Column('SP_PHONE', sa.String(), nullable=True),
|
|
sa.Column('SP_FAX', sa.String(), nullable=True),
|
|
sa.Column('SP_EMAIL', sa.String(), nullable=True),
|
|
sa.Column('SP_HOMEPAGE', sa.String(), nullable=True),
|
|
sa.Column('COMMONRULEAGENCY', sa.Boolean(), nullable=True),
|
|
sa.Column('SP_TYPE', sa.String(), nullable=True),
|
|
sa.Column('SP_TYPE_GROUP_NAME', sa.String(), nullable=True),
|
|
sa.PrimaryKeyConstraint('SPONSOR_ID')
|
|
)
|
|
op.create_table('study_sponsor',
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
sa.Column('SS_STUDY', sa.Integer(), nullable=True),
|
|
sa.Column('SPONSOR_ID', sa.Integer(), nullable=True),
|
|
sa.ForeignKeyConstraint(['SPONSOR_ID'], ['sponsor.SPONSOR_ID'], ),
|
|
sa.ForeignKeyConstraint(['SS_STUDY'], ['study.STUDYID'], ),
|
|
sa.PrimaryKeyConstraint('id')
|
|
)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table('study_sponsor')
|
|
op.drop_table('sponsor')
|
|
# ### end Alembic commands ###
|