"""empty message

Revision ID: 9a122eb0ecd6
Revises: 8afa321d7a5d
Create Date: 2019-11-30 00:35:11.677162

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

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


def upgrade(engine_name):
    globals()["upgrade_%s" % engine_name]()


def downgrade(engine_name):
    globals()["downgrade_%s" % engine_name]()





def upgrade_():
    # ### commands auto generated by Alembic - please adjust! ###
    pass
    # ### end Alembic commands ###


def downgrade_():
    # ### commands auto generated by Alembic - please adjust! ###
    pass
    # ### end Alembic commands ###


def upgrade_users():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('gst_update_request', sa.Column('request_date', sa.Date(), nullable=False))
    op.add_column('gst_update_request', sa.Column('request_time', sa.Time(), nullable=False))
    # ### end Alembic commands ###


def downgrade_users():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('gst_update_request', 'request_time')
    op.drop_column('gst_update_request', 'request_date')
    op.alter_column('customer_info', 'zone_id',
               existing_type=mysql.VARCHAR(length=50),
               nullable=True)
    op.alter_column('customer_info', 'user_name',
               existing_type=mysql.VARCHAR(length=100),
               nullable=True)
    op.alter_column('customer_info', 'ip_addr',
               existing_type=mysql.VARCHAR(length=100),
               nullable=True)
    op.alter_column('customer_info', 'customer_no',
               existing_type=mysql.VARCHAR(length=20),
               nullable=True)
    op.alter_column('customer_info', 'customer_name',
               existing_type=mysql.VARCHAR(length=400),
               nullable=True)
    # ### end Alembic commands ###


def upgrade_assets():
    # ### commands auto generated by Alembic - please adjust! ###
    pass
    # ### end Alembic commands ###


def downgrade_assets():
    # ### commands auto generated by Alembic - please adjust! ###
    pass
    # ### end Alembic commands ###


def upgrade_connection():
    # ### commands auto generated by Alembic - please adjust! ###
    pass
    # ### end Alembic commands ###


def downgrade_connection():
    # ### commands auto generated by Alembic - please adjust! ###
    pass
    # ### end Alembic commands ###


def upgrade_recharge():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('recharge_entry', sa.Column('customer_zone_id', sa.String(length=50), nullable=False))
    op.add_column('recharge_entry', sa.Column('payment_date', sa.Date(), nullable=False))
    op.add_column('recharge_entry', sa.Column('payment_time', sa.Time(), nullable=False))
    # ### end Alembic commands ###


def downgrade_recharge():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('recharge_entry', 'payment_time')
    op.drop_column('recharge_entry', 'payment_date')
    op.drop_column('recharge_entry', 'customer_zone_id')
    # ### end Alembic commands ###


def upgrade_ticket():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('ticket', sa.Column('closing_time', sa.Time(), nullable=True))
    op.add_column('ticket', sa.Column('opening_time', sa.Time(), nullable=False))
    # ### end Alembic commands ###


def downgrade_ticket():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('ticket', 'opening_time')
    op.drop_column('ticket', 'closing_time')
    # ### end Alembic commands ###


def upgrade_softphone():
    # ### commands auto generated by Alembic - please adjust! ###
    pass
    # ### end Alembic commands ###


def downgrade_softphone():
    # ### commands auto generated by Alembic - please adjust! ###
    pass
    # ### end Alembic commands ###


def upgrade_voucher():
    # ### commands auto generated by Alembic - please adjust! ###
    pass
    # ### end Alembic commands ###


def downgrade_voucher():
    # ### commands auto generated by Alembic - please adjust! ###
    pass
    # ### end Alembic commands ###

