You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

56 lines
1.8 KiB

"""empty message
Revision ID: 1a0a82192181
Revises: 7e9528cf1416
Create Date: 2023-04-11 19:01:00.565936
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1a0a82192181'
down_revision = '7e9528cf1416'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('chemical', schema=None) as batch_op:
batch_op.add_column(sa.Column('person_name', sa.String(), nullable=False))
batch_op.add_column(sa.Column('standard_grp', sa.String(), nullable=False))
batch_op.add_column(sa.Column('metabolite_name', sa.String(), nullable=False))
batch_op.alter_column('inchikey',
existing_type=sa.VARCHAR(),
nullable=False)
batch_op.alter_column('final_adduct',
existing_type=sa.VARCHAR(),
nullable=False)
batch_op.alter_column('msms_detected',
existing_type=sa.BOOLEAN(),
nullable=False)
batch_op.drop_column('name')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('chemical', schema=None) as batch_op:
batch_op.add_column(sa.Column('name', sa.VARCHAR(), nullable=False))
batch_op.alter_column('msms_detected',
existing_type=sa.BOOLEAN(),
nullable=True)
batch_op.alter_column('final_adduct',
existing_type=sa.VARCHAR(),
nullable=True)
batch_op.alter_column('inchikey',
existing_type=sa.VARCHAR(),
nullable=True)
batch_op.drop_column('metabolite_name')
batch_op.drop_column('standard_grp')
batch_op.drop_column('person_name')
# ### end Alembic commands ###