app/migrations/versions/2021_072818_dfee471558bd_.py

36 lines
1.1 KiB
Python
Raw Normal View History

"""empty message
Revision ID: dfee471558bd
Revises: 20c738810b1b
Create Date: 2021-07-28 18:29:46.072981
"""
import sqlalchemy_utils
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'dfee471558bd'
down_revision = '20c738810b1b'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('metric2', sa.Column('nb_block_last_24h', sa.Float(), nullable=True))
op.add_column('metric2', sa.Column('nb_bounced_last_24h', sa.Float(), nullable=True))
op.add_column('metric2', sa.Column('nb_forward_last_24h', sa.Float(), nullable=True))
op.add_column('metric2', sa.Column('nb_reply_last_24h', sa.Float(), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('metric2', 'nb_reply_last_24h')
op.drop_column('metric2', 'nb_forward_last_24h')
op.drop_column('metric2', 'nb_bounced_last_24h')
op.drop_column('metric2', 'nb_block_last_24h')
# ### end Alembic commands ###