"""Add password reset token

Revision ID: <KEY>
Revises: <PASSWORD>
Create Date: 2020-10-04 16:01:30.699154

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "<KEY>"
down_revision = "<PASSWORD>"
branch_labels = None
depends_on = None


def upgrade():
    op.create_table(
        "password_reset_tokens",
        sa.Column("token", sa.String(length=128), nullable=False),
        sa.Column("expires", sa.DateTime(), nullable=False),
        sa.Column("user_id", sa.Integer(), nullable=False),
        sa.ForeignKeyConstraint(("user_id",), ("users.id",)),
        sa.PrimaryKeyConstraint("token"),
    )


def downgrade():
    op.drop_table("password_reset_tokens")

"""Add password reset token

Revision ID: <KEY>
Revises: <PASSWORD>
Create Date: 2020-10-04 16:01:30.699154

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "<KEY>"
down_revision = "<PASSWORD>"
branch_labels = None
depends_on = None


def upgrade():
    op.create_table(
        "password_reset_tokens",
        sa.Column("token", sa.String(length=128), nullable=False),
        sa.Column("expires", sa.DateTime(), nullable=False),
        sa.Column("user_id", sa.Integer(), nullable=False),
        sa.ForeignKeyConstraint(("user_id",), ("users.id",)),
        sa.PrimaryKeyConstraint("token"),
    )


def downgrade():
    op.drop_table("password_reset_tokens")

Add password reset token  Revision ID: <KEY> Revises: <PASSWORD> Create Date: 2020-10-04 16:01:30.699154 # revision identifiers, used by Alembic.