"""Added new anomaly data table

Revision ID: <KEY>
Revises: <PASSWORD>
Create Date: 2021-08-31 12:12:59.984125

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = '<PASSWORD>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('anomaly_data_output',
        sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('data_datetime', sa.DateTime(), nullable=True),
        sa.Column('y', sa.Float(), nullable=True),
        sa.Column('yhat_upper', sa.Float(), nullable=True),
        sa.Column('yhat_lower', sa.Float(), nullable=True),
        sa.Column('is_anomaly', sa.BigInteger(), nullable=True),
        sa.Column('severity', sa.Float(), nullable=True),
        sa.Column('kpi_id', sa.Integer(), nullable=False),
        sa.Column('anomaly_type', sa.String(length=80), nullable=False),
        sa.Column('series_type', sa.String(length=80), nullable=True),
        sa.Column('index', sa.BigInteger(), nullable=False),
        sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('anomaly_data_output')
    # ### end Alembic commands ###

"""Added new anomaly data table

Revision ID: <KEY>
Revises: <PASSWORD>
Create Date: 2021-08-31 12:12:59.984125

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = '<PASSWORD>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('anomaly_data_output',
        sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('data_datetime', sa.DateTime(), nullable=True),
        sa.Column('y', sa.Float(), nullable=True),
        sa.Column('yhat_upper', sa.Float(), nullable=True),
        sa.Column('yhat_lower', sa.Float(), nullable=True),
        sa.Column('is_anomaly', sa.BigInteger(), nullable=True),
        sa.Column('severity', sa.Float(), nullable=True),
        sa.Column('kpi_id', sa.Integer(), nullable=False),
        sa.Column('anomaly_type', sa.String(length=80), nullable=False),
        sa.Column('series_type', sa.String(length=80), nullable=True),
        sa.Column('index', sa.BigInteger(), nullable=False),
        sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('anomaly_data_output')
    # ### end Alembic commands ###

Added new anomaly data table  Revision ID: <KEY> Revises: <PASSWORD> Create Date: 2021-08-31 12:12:59.984125 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ###