"""add_password_changed_at_col

Revision ID: d58a526bf837
Revises: d6a02307a057
Create Date: 2023-05-22 15:04:20.452390

"""

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "d58a526bf837"
down_revision = "d6a02307a057"
branch_labels = None
depends_on = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        "users",
        sa.Column(
            "password_changed_at",
            sa.DateTime(timezone=True),
            server_default=sa.text("now()"),
            nullable=True,
        ),
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("users", "password_changed_at")
    # ### end Alembic commands ###
