|
|
"""first migration
Revision ID: 7e9528cf1416 Revises: Create Date: 2023-02-05 19:02:36.284051
"""
from alembic import op import sqlalchemy as sa
# revision identifiers, used by Alembic. revision = '7e9528cf1416' down_revision = None branch_labels = None depends_on = None
def upgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_table('admin', sa.Column('id', sa.Integer(), nullable=False), sa.Column('username', sa.String(), nullable=False), sa.Column('password', sa.String(), nullable=False), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('username') ) op.create_table('chemical', sa.Column('id', sa.Integer(), nullable=False), sa.Column('chemical_db_id', sa.String(), nullable=True), sa.Column('library', sa.String(), nullable=True), sa.Column('name', sa.String(), nullable=False), sa.Column('formula', sa.String(), nullable=False), sa.Column('mass', sa.Float(), nullable=False), sa.Column('pubchem_cid', sa.Integer(), nullable=True), sa.Column('pubmed_refcount', sa.Integer(), nullable=True), sa.Column('standard_class', sa.String(), nullable=True), sa.Column('inchikey', sa.String(), nullable=True), sa.Column('inchikey14', sa.String(), nullable=True), sa.Column('final_mz', sa.Float(), nullable=False), sa.Column('final_rt', sa.Float(), nullable=False), sa.Column('final_adduct', sa.String(), nullable=True), sa.Column('adduct', sa.String(), nullable=True), sa.Column('detected_adducts', sa.String(), nullable=True), sa.Column('adduct_calc_mz', sa.String(), nullable=True), sa.Column('msms_detected', sa.Boolean(), nullable=True), sa.Column('msms_purity', sa.Float(), nullable=True), sa.Column('createdAt', sa.Date(), nullable=True), sa.PrimaryKeyConstraint('id') ) # ### end Alembic commands ###
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.drop_table('chemical') op.drop_table('admin') # ### end Alembic commands ###
|