use invite token instead of id for invitation url
This commit is contained in:
30
alembic/versions/81e6babf5136_add_token_to_invitation.py
Normal file
30
alembic/versions/81e6babf5136_add_token_to_invitation.py
Normal file
@@ -0,0 +1,30 @@
|
||||
"""add token to invitation
|
||||
|
||||
Revision ID: 81e6babf5136
|
||||
Revises: 67955a4abaef
|
||||
Create Date: 2018-10-29 09:26:30.728348
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '81e6babf5136'
|
||||
down_revision = '67955a4abaef'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('invitations', sa.Column('token', sa.String(), nullable=True))
|
||||
op.create_index(op.f('ix_invitations_token'), 'invitations', ['token'], unique=True)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f('ix_invitations_token'), table_name='invitations')
|
||||
op.drop_column('invitations', 'token')
|
||||
# ### end Alembic commands ###
|
Reference in New Issue
Block a user