"""More Event data, User fullname

Revision ID: 2b948713686c
Revises: d834973bc366
Create Date: 2023-08-15 17:07:12.899947

"""
from alembic import op
import sqlalchemy as sa
from dribdat.database import SqliteDecimal

# revision identifiers, used by Alembic.
revision = '2b948713686c'
down_revision = 'd834973bc366'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('events', schema=None) as batch_op:
        batch_op.add_column(sa.Column('location_lat', SqliteDecimal(5), nullable=True))
        batch_op.add_column(sa.Column('location_lon', SqliteDecimal(5), nullable=True))
        batch_op.add_column(sa.Column('lock_templates', sa.Boolean(), nullable=True))

    with op.batch_alter_table('users', schema=None) as batch_op:
        batch_op.add_column(sa.Column('fullname', sa.String(length=255), nullable=True))

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('users', schema=None) as batch_op:
        batch_op.drop_column('fullname')

    with op.batch_alter_table('events', schema=None) as batch_op:
        batch_op.drop_column('lock_templates')
        batch_op.drop_column('location_lon')
        batch_op.drop_column('location_lat')

    # ### end Alembic commands ###
