"""remove streams

Revision ID: 6d748f2c7b0b
Revises: b8be148dbc85
Create Date: 2023-05-24 15:22:11.969791

"""
from alembic import op
import sqlalchemy as sa
import mindsdb.interfaces.storage.db # noqa


# revision identifiers, used by Alembic.
revision = '6d748f2c7b0b'
down_revision = 'b8be148dbc85'
branch_labels = None
depends_on = None


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


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        'stream',
        sa.Column('id', sa.INTEGER(), nullable=False),
        sa.Column('name', sa.VARCHAR(), nullable=False),
        sa.Column('stream_in', sa.VARCHAR(), nullable=False),
        sa.Column('stream_out', sa.VARCHAR(), nullable=False),
        sa.Column('anomaly_stream', sa.VARCHAR(), nullable=True),
        sa.Column('integration', sa.VARCHAR(), nullable=True),
        sa.Column('predictor', sa.VARCHAR(), nullable=False),
        sa.Column('company_id', sa.INTEGER(), nullable=True),
        sa.Column('updated_at', sa.DATETIME(), nullable=True),
        sa.Column('created_at', sa.DATETIME(), nullable=True),
        sa.Column('type', sa.VARCHAR(), nullable=True),
        sa.Column('connection_info', sa.VARCHAR(), nullable=True),
        sa.Column('learning_params', sa.VARCHAR(), nullable=True),
        sa.Column('learning_threshold', sa.INTEGER(), nullable=True),
        sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###
