37 lines
1.0 KiB
Python
37 lines
1.0 KiB
Python
"""Initial migration.
|
|
|
|
Revision ID: bf0456b014c1
|
|
Revises:
|
|
Create Date: 2025-02-26 11:21:42.535143
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'bf0456b014c1'
|
|
down_revision = None
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('magic_token',
|
|
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
|
|
sa.Column('token', sa.String(length=255, collation='utf8mb4_bin'), nullable=False),
|
|
sa.Column('email', sa.String(length=255), nullable=False),
|
|
sa.Column('expiration_date', sa.DateTime(), server_default=sa.text('now()'), nullable=False),
|
|
sa.Column('used', sa.Boolean(), nullable=False),
|
|
sa.Column('user_dn', sa.String(length=255), nullable=False),
|
|
sa.PrimaryKeyConstraint('id')
|
|
)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table('magic_token')
|
|
# ### end Alembic commands ###
|