"""Update pings table

Revision ID: 85ea2d438ac8
Revises: 414529b77ea3
Create Date: 2019-01-29 00:08:10.292623

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = '85ea2d438ac8'
down_revision = '414529b77ea3'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('ping',
    sa.Column('date_created', sa.DateTime(), nullable=True),
    sa.Column('date_modified', sa.DateTime(), nullable=True),
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('from_ip', sa.String(length=120), nullable=True),
    sa.Column('host', sa.String(length=120), nullable=True),
    sa.Column('timestamp', sa.DateTime(), nullable=True),
    sa.Column('isdown', sa.Boolean(), nullable=True),
    sa.Column('response_code', sa.Integer(), nullable=True),
    sa.Column('from_api', sa.Integer(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.drop_table('pings')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('pings',
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
    sa.Column('from_ip', sa.VARCHAR(length=120), autoincrement=False, nullable=True),
    sa.Column('host', sa.VARCHAR(length=120), autoincrement=False, nullable=True),
    sa.Column('time_stamp', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('isdown', sa.BOOLEAN(), autoincrement=False, nullable=True),
    sa.Column('response_code', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.PrimaryKeyConstraint('id', name='pings_pkey')
    )
    op.drop_table('ping')
    # ### end Alembic commands ###

"""Update pings table

Revision ID: 85ea2d438ac8
Revises: 414529b77ea3
Create Date: 2019-01-29 00:08:10.292623

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = '85ea2d438ac8'
down_revision = '414529b77ea3'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('ping',
    sa.Column('date_created', sa.DateTime(), nullable=True),
    sa.Column('date_modified', sa.DateTime(), nullable=True),
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('from_ip', sa.String(length=120), nullable=True),
    sa.Column('host', sa.String(length=120), nullable=True),
    sa.Column('timestamp', sa.DateTime(), nullable=True),
    sa.Column('isdown', sa.Boolean(), nullable=True),
    sa.Column('response_code', sa.Integer(), nullable=True),
    sa.Column('from_api', sa.Integer(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.drop_table('pings')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('pings',
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
    sa.Column('from_ip', sa.VARCHAR(length=120), autoincrement=False, nullable=True),
    sa.Column('host', sa.VARCHAR(length=120), autoincrement=False, nullable=True),
    sa.Column('time_stamp', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('isdown', sa.BOOLEAN(), autoincrement=False, nullable=True),
    sa.Column('response_code', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.PrimaryKeyConstraint('id', name='pings_pkey')
    )
    op.drop_table('ping')
    # ### end Alembic commands ###

Update pings table  Revision ID: 85ea2d438ac8 Revises: 414529b77ea3 Create Date: 2019-01-29 00:08:10.292623 # 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 ###