"""empty message

Revision ID: 9d3fea979c41
Revises: 8ccf9a973ac8
Create Date: 2021-06-25 19:10:03.514607

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

# revision identifiers, used by Alembic.
revision = '9d3fea979c41'
down_revision = '8ccf9a973ac8'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('blacklist_tokens',
    sa.Column('userid', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('token', sa.String(length=500), nullable=False),
    sa.Column('blacklisted_on', sa.DateTime(), nullable=False),
    sa.PrimaryKeyConstraint('userid'),
    sa.UniqueConstraint('token')
    )
    op.drop_table('Languages')
    op.drop_table('oldvehiclelist')
    op.drop_index('IX_Exceptions_App_Del_Cre', table_name='Exceptions')
    op.drop_index('IX_Exceptions_GUID_App_Del_Cre', table_name='Exceptions')
    op.drop_index('IX_Exceptions_Hash_App_Cre_Del', table_name='Exceptions')
    op.drop_table('Exceptions')
    op.drop_table('varpassdate')
    op.drop_table('oldowners')
    op.alter_column('RolePermissions', 'PermissionKey',
               existing_type=sa.VARCHAR(length=100),
               nullable=True)
    op.alter_column('RolePermissions', 'RoleId',
               existing_type=sa.INTEGER(),
               nullable=True)
    op.alter_column('RolePermissions', 'RolePermissionId',
               existing_type=sa.BIGINT(),
               server_default=None,
               existing_nullable=False,
               autoincrement=True)
    op.drop_index('UQ_RolePerm_RoleId_PermKey', table_name='RolePermissions')
    op.drop_constraint('FK_RolePermissions_RoleId', 'RolePermissions', type_='foreignkey')
    op.alter_column('Roles', 'RoleId',
               existing_type=sa.INTEGER(),
               server_default=None,
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('Roles', 'RoleName',
               existing_type=sa.VARCHAR(length=100),
               nullable=True)
    op.alter_column('UserPermissions', 'PermissionKey',
               existing_type=sa.VARCHAR(length=100),
               nullable=True)
    op.alter_column('UserPermissions', 'UserPermissionId',
               existing_type=sa.BIGINT(),
               server_default=None,
               existing_nullable=False,
               autoincrement=True)
    op.drop_index('UQ_UserPerm_UserId_PermKey', table_name='UserPermissions')
    op.drop_constraint('FK_UserPermissions_UserId', 'UserPermissions', type_='foreignkey')
    op.alter_column('UserRoles', 'RoleId',
               existing_type=sa.INTEGER(),
               nullable=True)
    op.alter_column('UserRoles', 'UserId',
               existing_type=sa.INTEGER(),
               nullable=True)
    op.alter_column('UserRoles', 'UserRoleId',
               existing_type=sa.BIGINT(),
               server_default=None,
               existing_nullable=False,
               autoincrement=True)
    op.drop_index('IX_UserRoles_RoleId_UserId', table_name='UserRoles')
    op.drop_index('UQ_UserRoles_UserId_RoleId', table_name='UserRoles')
    op.drop_constraint('FK_UserRoles_RoleId', 'UserRoles', type_='foreignkey')
    op.drop_constraint('FK_UserRoles_UserId', 'UserRoles', type_='foreignkey')
    op.alter_column('Users', 'DisplayName',
               existing_type=sa.VARCHAR(length=100),
               nullable=True)
    op.alter_column('Users', 'InsertDate',
               existing_type=postgresql.TIMESTAMP(),
               nullable=True)
    op.alter_column('Users', 'InsertUserId',
               existing_type=sa.INTEGER(),
               nullable=True)
    op.alter_column('Users', 'IsActive',
               existing_type=sa.SMALLINT(),
               nullable=True,
               existing_server_default=sa.text('1'))
    op.alter_column('Users', 'PasswordHash',
               existing_type=sa.VARCHAR(length=86),
               nullable=True)
    op.alter_column('Users', 'PasswordSalt',
               existing_type=sa.VARCHAR(length=10),
               nullable=True)
    op.alter_column('Users', 'Source',
               existing_type=sa.VARCHAR(length=4),
               nullable=True)
    op.alter_column('Users', 'UserId',
               existing_type=sa.INTEGER(),
               server_default=None,
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('Users', 'Username',
               existing_type=sa.VARCHAR(length=100),
               nullable=True)
    op.alter_column('assets', 'assetid',
               existing_type=sa.INTEGER(),
               server_default=None,
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('category', 'categoryid',
               existing_type=sa.INTEGER(),
               server_default=None,
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('company', 'cid',
               existing_type=sa.BIGINT(),
               server_default=None,
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('drivers', 'driverid',
               existing_type=sa.BIGINT(),
               server_default=None,
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('fuelgate', 'fuelid',
               existing_type=sa.BIGINT(),
               server_default=None,
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('fuelmaster', 'fuelid',
               existing_type=sa.BIGINT(),
               server_default=None,
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('ingate', 'slipid',
               existing_type=sa.BIGINT(),
               server_default=None,
               existing_nullable=False,
               autoincrement=True)
    op.drop_constraint('uq_in_slipno', 'ingate', type_='unique')
    op.alter_column('locations', 'locationid',
               existing_type=sa.INTEGER(),
               server_default=None,
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('outgate', 'challanid',
               existing_type=sa.BIGINT(),
               server_default=None,
               existing_nullable=False,
               autoincrement=True)
    op.drop_constraint('uq_out_challanno', 'outgate', type_='unique')
    op.drop_constraint('uq_out_slipno', 'outgate', type_='unique')
    op.alter_column('owners', 'ownerid',
               existing_type=sa.INTEGER(),
               server_default=None,
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('railwaysiding', 'entryid',
               existing_type=sa.BIGINT(),
               server_default=None,
               existing_nullable=False,
               autoincrement=True)
    op.drop_constraint('uq_rail_challanno', 'railwaysiding', type_='unique')
    op.alter_column('rfidtag', 'rfid',
               existing_type=sa.BIGINT(),
               server_default=None,
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('test_ingate', 'slipid',
               existing_type=sa.BIGINT(),
               server_default=None,
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('test_outgate', 'challanid',
               existing_type=sa.BIGINT(),
               server_default=None,
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('userpreferences', 'Name',
               existing_type=sa.VARCHAR(length=200),
               nullable=True)
    op.alter_column('userpreferences', 'PreferenceType',
               existing_type=sa.VARCHAR(length=100),
               nullable=True)
    op.alter_column('userpreferences', 'UserId',
               existing_type=sa.BIGINT(),
               nullable=True)
    op.alter_column('userpreferences', 'UserPreferenceId',
               existing_type=sa.INTEGER(),
               server_default=None,
               existing_nullable=False,
               autoincrement=True)
    op.drop_index('IX_UserPref_UID_PrefType_Name', table_name='userpreferences')
    op.alter_column('users_app', 'id',
               existing_type=sa.BIGINT(),
               server_default=None,
               existing_nullable=False,
               autoincrement=True)
    op.drop_column('users_app', 'password')
    op.alter_column('vehicles', 'vehicleid',
               existing_type=sa.INTEGER(),
               server_default=None,
               existing_nullable=False,
               autoincrement=True)
    op.drop_column('vehicles', 'rfid')
    op.alter_column('weighbridge', 'wbid',
               existing_type=sa.INTEGER(),
               server_default=None,
               existing_nullable=False,
               autoincrement=True)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('weighbridge', 'wbid',
               existing_type=sa.INTEGER(),
               server_default=sa.Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=2147483647, cycle=False, cache=1),
               existing_nullable=False,
               autoincrement=True)
    op.add_column('vehicles', sa.Column('rfid', sa.BIGINT(), autoincrement=False, nullable=True))
    op.alter_column('vehicles', 'vehicleid',
               existing_type=sa.INTEGER(),
               server_default=sa.Identity(always=True, start=2001, increment=1, minvalue=1, maxvalue=2147483647, cycle=False, cache=1),
               existing_nullable=False,
               autoincrement=True)
    op.add_column('users_app', sa.Column('password', sa.TEXT(), autoincrement=False, nullable=True))
    op.alter_column('users_app', 'id',
               existing_type=sa.BIGINT(),
               server_default=sa.Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=9223372036854775807, cycle=False, cache=1),
               existing_nullable=False,
               autoincrement=True)
    op.create_index('IX_UserPref_UID_PrefType_Name', 'userpreferences', ['UserId', 'PreferenceType', 'Name'], unique=True)
    op.alter_column('userpreferences', 'UserPreferenceId',
               existing_type=sa.INTEGER(),
               server_default=sa.Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=2147483647, cycle=False, cache=1),
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('userpreferences', 'UserId',
               existing_type=sa.BIGINT(),
               nullable=False)
    op.alter_column('userpreferences', 'PreferenceType',
               existing_type=sa.VARCHAR(length=100),
               nullable=False)
    op.alter_column('userpreferences', 'Name',
               existing_type=sa.VARCHAR(length=200),
               nullable=False)
    op.alter_column('test_outgate', 'challanid',
               existing_type=sa.BIGINT(),
               server_default=sa.Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=9223372036854775807, cycle=False, cache=1),
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('test_ingate', 'slipid',
               existing_type=sa.BIGINT(),
               server_default=sa.Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=9223372036854775807, cycle=False, cache=1),
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('rfidtag', 'rfid',
               existing_type=sa.BIGINT(),
               server_default=sa.Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=9223372036854775807, cycle=False, cache=1),
               existing_nullable=False,
               autoincrement=True)
    op.create_unique_constraint('uq_rail_challanno', 'railwaysiding', ['challanno'])
    op.alter_column('railwaysiding', 'entryid',
               existing_type=sa.BIGINT(),
               server_default=sa.Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=9223372036854775807, cycle=False, cache=1),
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('owners', 'ownerid',
               existing_type=sa.INTEGER(),
               server_default=sa.Identity(always=True, start=2001, increment=1, minvalue=1, maxvalue=2147483647, cycle=False, cache=1),
               existing_nullable=False,
               autoincrement=True)
    op.create_unique_constraint('uq_out_slipno', 'outgate', ['slipno'])
    op.create_unique_constraint('uq_out_challanno', 'outgate', ['challanno'])
    op.alter_column('outgate', 'challanid',
               existing_type=sa.BIGINT(),
               server_default=sa.Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=9223372036854775807, cycle=False, cache=1),
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('locations', 'locationid',
               existing_type=sa.INTEGER(),
               server_default=sa.Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=2147483647, cycle=False, cache=1),
               existing_nullable=False,
               autoincrement=True)
    op.create_unique_constraint('uq_in_slipno', 'ingate', ['slipno'])
    op.alter_column('ingate', 'slipid',
               existing_type=sa.BIGINT(),
               server_default=sa.Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=9223372036854775807, cycle=False, cache=1),
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('fuelmaster', 'fuelid',
               existing_type=sa.BIGINT(),
               server_default=sa.Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=9223372036854775807, cycle=False, cache=1),
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('fuelgate', 'fuelid',
               existing_type=sa.BIGINT(),
               server_default=sa.Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=9223372036854775807, cycle=False, cache=1),
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('drivers', 'driverid',
               existing_type=sa.BIGINT(),
               server_default=sa.Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=9223372036854775807, cycle=False, cache=1),
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('company', 'cid',
               existing_type=sa.BIGINT(),
               server_default=sa.Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=9223372036854775807, cycle=False, cache=1),
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('category', 'categoryid',
               existing_type=sa.INTEGER(),
               server_default=sa.Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=2147483647, cycle=False, cache=1),
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('assets', 'assetid',
               existing_type=sa.INTEGER(),
               server_default=sa.Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=2147483647, cycle=False, cache=1),
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('Users', 'Username',
               existing_type=sa.VARCHAR(length=100),
               nullable=False)
    op.alter_column('Users', 'UserId',
               existing_type=sa.INTEGER(),
               server_default=sa.Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=2147483647, cycle=False, cache=1),
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('Users', 'Source',
               existing_type=sa.VARCHAR(length=4),
               nullable=False)
    op.alter_column('Users', 'PasswordSalt',
               existing_type=sa.VARCHAR(length=10),
               nullable=False)
    op.alter_column('Users', 'PasswordHash',
               existing_type=sa.VARCHAR(length=86),
               nullable=False)
    op.alter_column('Users', 'IsActive',
               existing_type=sa.SMALLINT(),
               nullable=False,
               existing_server_default=sa.text('1'))
    op.alter_column('Users', 'InsertUserId',
               existing_type=sa.INTEGER(),
               nullable=False)
    op.alter_column('Users', 'InsertDate',
               existing_type=postgresql.TIMESTAMP(),
               nullable=False)
    op.alter_column('Users', 'DisplayName',
               existing_type=sa.VARCHAR(length=100),
               nullable=False)
    op.create_foreign_key('FK_UserRoles_UserId', 'UserRoles', 'Users', ['UserId'], ['UserId'])
    op.create_foreign_key('FK_UserRoles_RoleId', 'UserRoles', 'Roles', ['RoleId'], ['RoleId'])
    op.create_index('UQ_UserRoles_UserId_RoleId', 'UserRoles', ['UserId', 'RoleId'], unique=True)
    op.create_index('IX_UserRoles_RoleId_UserId', 'UserRoles', ['RoleId', 'UserId'], unique=False)
    op.alter_column('UserRoles', 'UserRoleId',
               existing_type=sa.BIGINT(),
               server_default=sa.Identity(always=False, start=1, increment=1, minvalue=1, maxvalue=9223372036854775807, cycle=False, cache=1),
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('UserRoles', 'UserId',
               existing_type=sa.INTEGER(),
               nullable=False)
    op.alter_column('UserRoles', 'RoleId',
               existing_type=sa.INTEGER(),
               nullable=False)
    op.create_foreign_key('FK_UserPermissions_UserId', 'UserPermissions', 'Users', ['UserId'], ['UserId'])
    op.create_index('UQ_UserPerm_UserId_PermKey', 'UserPermissions', ['UserId', 'PermissionKey'], unique=True)
    op.alter_column('UserPermissions', 'UserPermissionId',
               existing_type=sa.BIGINT(),
               server_default=sa.Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=9223372036854775807, cycle=False, cache=1),
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('UserPermissions', 'PermissionKey',
               existing_type=sa.VARCHAR(length=100),
               nullable=False)
    op.alter_column('Roles', 'RoleName',
               existing_type=sa.VARCHAR(length=100),
               nullable=False)
    op.alter_column('Roles', 'RoleId',
               existing_type=sa.INTEGER(),
               server_default=sa.Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=2147483647, cycle=False, cache=1),
               existing_nullable=False,
               autoincrement=True)
    op.create_foreign_key('FK_RolePermissions_RoleId', 'RolePermissions', 'Roles', ['RoleId'], ['RoleId'])
    op.create_index('UQ_RolePerm_RoleId_PermKey', 'RolePermissions', ['RoleId', 'PermissionKey'], unique=True)
    op.alter_column('RolePermissions', 'RolePermissionId',
               existing_type=sa.BIGINT(),
               server_default=sa.Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=9223372036854775807, cycle=False, cache=1),
               existing_nullable=False,
               autoincrement=True)
    op.alter_column('RolePermissions', 'RoleId',
               existing_type=sa.INTEGER(),
               nullable=False)
    op.alter_column('RolePermissions', 'PermissionKey',
               existing_type=sa.VARCHAR(length=100),
               nullable=False)
    op.create_table('oldowners',
    sa.Column('ownerid', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('ownername', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('address1', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('address2', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('pan', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('aadhar', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('mobile', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('gst', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('startdate', sa.DATE(), autoincrement=False, nullable=True),
    sa.Column('enddate', sa.DATE(), autoincrement=False, nullable=True),
    sa.Column('dlno', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('isactive', sa.BOOLEAN(), autoincrement=False, nullable=True),
    sa.Column('status', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('statuschangedate', sa.DATE(), autoincrement=False, nullable=True),
    sa.Column('stateid', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('state', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('pincode', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('bankname', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('accountno', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('ifsc', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('transportercode', sa.TEXT(), autoincrement=False, nullable=True)
    )
    op.create_table('varpassdate',
    sa.Column('passdate', postgresql.TIMESTAMP(), autoincrement=False, nullable=True)
    )
    op.create_table('Exceptions',
    sa.Column('Id', sa.BIGINT(), sa.Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=9223372036854775807, cycle=False, cache=1), autoincrement=True, nullable=False),
    sa.Column('GUID', postgresql.UUID(), autoincrement=False, nullable=False),
    sa.Column('ApplicationName', sa.VARCHAR(length=50), autoincrement=False, nullable=False),
    sa.Column('MachineName', sa.VARCHAR(length=50), autoincrement=False, nullable=False),
    sa.Column('CreationDate', postgresql.TIMESTAMP(), autoincrement=False, nullable=False),
    sa.Column('Type', sa.VARCHAR(length=100), autoincrement=False, nullable=False),
    sa.Column('IsProtected', sa.BOOLEAN(), server_default=sa.text('true'), autoincrement=False, nullable=False),
    sa.Column('Host', sa.VARCHAR(length=100), autoincrement=False, nullable=True),
    sa.Column('Url', sa.VARCHAR(length=500), autoincrement=False, nullable=True),
    sa.Column('HTTPMethod', sa.VARCHAR(length=10), autoincrement=False, nullable=True),
    sa.Column('IPAddress', sa.VARCHAR(length=40), autoincrement=False, nullable=True),
    sa.Column('Source', sa.VARCHAR(length=100), autoincrement=False, nullable=True),
    sa.Column('Message', sa.VARCHAR(length=1000), autoincrement=False, nullable=True),
    sa.Column('Detail', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('StatusCode', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('SQL', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('DeletionDate', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('FullJson', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('ErrorHash', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('DuplicateCount', sa.INTEGER(), server_default=sa.text('1'), autoincrement=False, nullable=False),
    sa.PrimaryKeyConstraint('Id', name='PK_Exceptions')
    )
    op.create_index('IX_Exceptions_Hash_App_Cre_Del', 'Exceptions', ['ErrorHash', 'ApplicationName', 'CreationDate', 'DeletionDate'], unique=False)
    op.create_index('IX_Exceptions_GUID_App_Del_Cre', 'Exceptions', ['GUID', 'ApplicationName', 'DeletionDate', 'CreationDate'], unique=False)
    op.create_index('IX_Exceptions_App_Del_Cre', 'Exceptions', ['ApplicationName', 'DeletionDate', 'CreationDate'], unique=False)
    op.create_table('oldvehiclelist',
    sa.Column('vehicleid', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('vehicleno', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('compliant', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('ownerid', sa.BIGINT(), autoincrement=False, nullable=True),
    sa.Column('ownername', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('ownermobile', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('rcno', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('tempno', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('chasisno', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('fitnessexpiry', sa.DATE(), autoincrement=False, nullable=True),
    sa.Column('insuranceexpiry', sa.DATE(), autoincrement=False, nullable=True),
    sa.Column('permitexpiry', sa.DATE(), autoincrement=False, nullable=True),
    sa.Column('pollutionexpiry', sa.DATE(), autoincrement=False, nullable=True),
    sa.Column('permittype', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('status', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('statuschangedate', sa.DATE(), autoincrement=False, nullable=True),
    sa.Column('createdate', sa.DATE(), autoincrement=False, nullable=True),
    sa.Column('ownerpan', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('rfno', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('rfid', sa.BIGINT(), autoincrement=False, nullable=True),
    sa.Column('permit', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('insurance', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('pollution', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('fitness', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('isactive', sa.BOOLEAN(), autoincrement=False, nullable=True),
    sa.Column('roadtax', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('roadtaxexpiry', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('rcdate', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('wheeler', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('vowner', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('vcontact', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('vaddress', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('vownership', sa.BOOLEAN(), autoincrement=False, nullable=True)
    )
    op.create_table('Languages',
    sa.Column('Id', sa.INTEGER(), sa.Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=2147483647, cycle=False, cache=1), autoincrement=True, nullable=False),
    sa.Column('LanguageId', sa.VARCHAR(length=10), autoincrement=False, nullable=False),
    sa.Column('LanguageName', sa.VARCHAR(length=50), autoincrement=False, nullable=False),
    sa.PrimaryKeyConstraint('Id', name='PK_Languages')
    )
    op.drop_table('blacklist_tokens')
    # ### end Alembic commands ###
