2023-12-25 16:28:09 +00:00
|
|
|
"""passkey
|
|
|
|
|
|
|
|
Revision ID: b5448df204eb
|
|
|
|
Revises: a74320a5d7a1
|
|
|
|
Create Date: 2023-12-25 00:13:01.703575
|
|
|
|
|
|
|
|
"""
|
|
|
|
from alembic import op
|
|
|
|
import sqlalchemy as sa
|
|
|
|
|
|
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
|
|
revision = 'b5448df204eb'
|
|
|
|
down_revision = 'a74320a5d7a1'
|
|
|
|
branch_labels = None
|
|
|
|
depends_on = None
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade():
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
|
|
op.create_table('passkey_credential',
|
|
|
|
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
|
|
|
|
sa.Column('user_id', sa.Uuid(), nullable=False),
|
2023-12-25 17:57:27 +00:00
|
|
|
sa.Column('credential_id', sa.LargeBinary(), nullable=False),
|
|
|
|
sa.Column('credential_public_key', sa.LargeBinary(), nullable=False),
|
2023-12-25 16:28:09 +00:00
|
|
|
sa.Column('name', sa.String(length=250), nullable=False),
|
|
|
|
sa.Column('last_used', sa.DateTime(), nullable=True),
|
|
|
|
sa.Column('sign_count', sa.Integer(), nullable=False),
|
|
|
|
sa.Column('created_at', sa.DateTime(), nullable=False),
|
|
|
|
sa.Column('modified_at', sa.DateTime(), nullable=False),
|
|
|
|
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ondelete='CASCADE'),
|
|
|
|
sa.PrimaryKeyConstraint('id')
|
|
|
|
)
|
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
|
|
|
|
|
|
def downgrade():
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
|
|
op.drop_table('passkey_credential')
|
|
|
|
# ### end Alembic commands ###
|