"""added wazeAlert model

Revision ID: 687465b3b8f1
Revises: 5a5ffe56bb7
Create Date: 2020-02-01 21:53:06.593331

"""
from alembic import op
import sqlalchemy as sa
import geoalchemy2



# revision identifiers, used by Alembic.
revision = '687465b3b8f1'
down_revision = '5a5ffe56bb7'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('waze_alerts',
    sa.Column('id', sa.BigInteger(), nullable=False),
    sa.Column('city', sa.Text(), nullable=True),
    sa.Column('confidence', sa.Integer(), nullable=True),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.Column('lontitude', sa.Float(), nullable=True),
    sa.Column('latitude', sa.Float(), nullable=True),
    sa.Column('magvar', sa.Integer(), nullable=True),
    sa.Column('number_thumbs_up', sa.Integer(), nullable=True),
    sa.Column('report_rating', sa.Integer(), nullable=True),
    sa.Column('reliability', sa.Integer(), nullable=True),
    sa.Column('alert_type', sa.Text(), nullable=True),
    sa.Column('alert_subtype', sa.Text(), nullable=True),
    sa.Column('uuid', sa.Text(), nullable=True),
    sa.Column('street', sa.Text(), nullable=True),
    sa.Column('road_type', sa.Integer(), nullable=True),
    sa.Column('geom', geoalchemy2.types.Geometry(geometry_type='POINT'), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )

    # ### end Alembic commands ###


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