mirror of
https://github.com/sartography/uva-covid19-testing-communicator.git
synced 2025-02-23 20:38:13 +00:00
44 lines
1.4 KiB
Python
44 lines
1.4 KiB
Python
"""empty message
|
|
|
|
Revision ID: d904b7b3c1c0
|
|
Revises: 8a2bf0c948ec
|
|
Create Date: 2020-09-16 14:24:44.697062
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'd904b7b3c1c0'
|
|
down_revision = '8a2bf0c948ec'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('notification',
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
sa.Column('date', sa.DateTime(), nullable=True),
|
|
sa.Column('type', sa.String(), nullable=True),
|
|
sa.Column('successful', sa.Boolean(), nullable=True),
|
|
sa.Column('error_message', sa.String(), nullable=True),
|
|
sa.Column('sample_barcode', sa.String(), nullable=False),
|
|
sa.ForeignKeyConstraint(['sample_barcode'], ['sample.barcode'], ),
|
|
sa.PrimaryKeyConstraint('id')
|
|
)
|
|
op.add_column('sample', sa.Column('email_notified', sa.Boolean(), nullable=True))
|
|
op.add_column('sample', sa.Column('text_notified', sa.Boolean(), nullable=True))
|
|
op.drop_column('sample', 'notified')
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.add_column('sample', sa.Column('notified', sa.BOOLEAN(), autoincrement=False, nullable=True))
|
|
op.drop_column('sample', 'text_notified')
|
|
op.drop_column('sample', 'email_notified')
|
|
op.drop_table('notification')
|
|
# ### end Alembic commands ###
|