"""empty message

Revision ID: 486413a38648
Revises: 9d2cc3010c3c
Create Date: 2021-05-22 10:11:18.091139

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '486413a38648'
down_revision = '9d2cc3010c3c'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('Users',
    sa.Column('userid', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('publicid', sa.String(length=100), nullable=True),
    sa.Column('username', sa.String(length=100), nullable=True),
    sa.Column('displayname', sa.String(length=100), nullable=True),
    sa.Column('email', sa.String(length=100), nullable=True),
    sa.Column('source', sa.String(length=4), nullable=True),
    sa.Column('passwordhash', sa.String(length=86), nullable=True),
    sa.Column('passwordsalt', sa.String(length=10), nullable=True),
    sa.Column('lastdirectoryupdate', sa.String(length=10), nullable=True),
    sa.Column('userimage', sa.String(length=100), nullable=True),
    sa.Column('insertdate', sa.DateTime(), nullable=True),
    sa.Column('insertuserid', sa.Integer(), nullable=True),
    sa.Column('updatedate', sa.DateTime(), nullable=True),
    sa.Column('isactive', sa.Boolean(), server_default='false', nullable=True),
    sa.Column('updateuserid', sa.Integer(), nullable=True),
    sa.PrimaryKeyConstraint('userid'),
    sa.UniqueConstraint('publicid')
    )
    op.drop_table('User')
    op.drop_column('vehicles', 'vowner')
    op.drop_column('vehicles', 'vcontact')
    op.drop_column('vehicles', 'vaddress')
    op.drop_column('vehicles', 'vownership')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('vehicles', sa.Column('vownership', sa.BOOLEAN(), server_default=sa.text("'false'"), nullable=True))
    op.add_column('vehicles', sa.Column('vaddress', sa.VARCHAR(length=50), nullable=True))
    op.add_column('vehicles', sa.Column('vcontact', sa.VARCHAR(length=50), nullable=True))
    op.add_column('vehicles', sa.Column('vowner', sa.VARCHAR(length=50), nullable=True))
    op.create_table('User',
    sa.Column('user_id', sa.INTEGER(), nullable=False),
    sa.Column('public_id', sa.VARCHAR(length=100), nullable=True),
    sa.Column('user_name', sa.VARCHAR(length=100), nullable=True),
    sa.Column('display_name', sa.VARCHAR(length=100), nullable=True),
    sa.Column('email', sa.VARCHAR(length=100), nullable=True),
    sa.Column('source', sa.VARCHAR(length=4), nullable=True),
    sa.Column('password_hash', sa.VARCHAR(length=86), nullable=True),
    sa.Column('password_salt', sa.VARCHAR(length=10), nullable=True),
    sa.Column('last_directory_update', sa.VARCHAR(length=10), nullable=True),
    sa.Column('user_image', sa.VARCHAR(length=100), nullable=True),
    sa.Column('insert_date', sa.DATETIME(), nullable=True),
    sa.Column('insert_user_id', sa.INTEGER(), nullable=True),
    sa.Column('update_date', sa.DATETIME(), nullable=True),
    sa.Column('is_active', sa.BOOLEAN(), server_default=sa.text("'false'"), nullable=True),
    sa.Column('update_user_id', sa.INTEGER(), nullable=True),
    sa.PrimaryKeyConstraint('user_id'),
    sa.UniqueConstraint('public_id')
    )
    op.drop_table('Users')
    # ### end Alembic commands ###
