"""added otp columns

Peek Plugin Database Migration Script

Revision ID: aa692f37c14d
Revises: d03db0fcb600
Create Date: 2024-02-29 15:00:43.262805

"""

# revision identifiers, used by Alembic.
revision = "aa692f37c14d"
down_revision = "2e6fbe116ff9"
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa
import geoalchemy2


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        table_name="InternalUser",
        column=sa.Column("oneTimePasscode", sa.String(), nullable=True),
        schema="core_user",
    )
    op.add_column(
        table_name="InternalUser",
        column=sa.Column(
            "oneTimePasscodeExpiry", sa.DateTime(timezone=True), nullable=True
        ),
        schema="core_user",
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column(
        table_name="InternalUser",
        column_name="oneTimePasscode",
        schema="core_user",
    )
    op.drop_column(
        table_name="InternalUser",
        column_name="oneTimePasscodeExpiry",
        schema="core_user",
    )
    # ### end Alembic commands ###
