mirror of
https://github.com/simple-login/app.git
synced 2024-09-28 20:51:29 +02:00
Add pgp_fingerprint as index for contacts
This commit is contained in:
parent
d6ff744083
commit
350d246d32
@ -1726,7 +1726,7 @@ class Contact(Base, ModelMixin):
|
|||||||
is_cc = sa.Column(sa.Boolean, nullable=False, default=False, server_default="0")
|
is_cc = sa.Column(sa.Boolean, nullable=False, default=False, server_default="0")
|
||||||
|
|
||||||
pgp_public_key = sa.Column(sa.Text, nullable=True)
|
pgp_public_key = sa.Column(sa.Text, nullable=True)
|
||||||
pgp_finger_print = sa.Column(sa.String(512), nullable=True)
|
pgp_finger_print = sa.Column(sa.String(512), nullable=True, index=True)
|
||||||
|
|
||||||
alias = orm.relationship(Alias, backref="contacts")
|
alias = orm.relationship(Alias, backref="contacts")
|
||||||
user = orm.relationship(User)
|
user = orm.relationship(User)
|
||||||
|
29
migrations/versions/2023_041418_893c0d18475f_.py
Normal file
29
migrations/versions/2023_041418_893c0d18475f_.py
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
"""empty message
|
||||||
|
|
||||||
|
Revision ID: 893c0d18475f
|
||||||
|
Revises: 5f4a5625da66
|
||||||
|
Create Date: 2023-04-14 18:20:03.807367
|
||||||
|
|
||||||
|
"""
|
||||||
|
import sqlalchemy_utils
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = '893c0d18475f'
|
||||||
|
down_revision = '5f4a5625da66'
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.create_index(op.f('ix_contact_pgp_finger_print'), 'contact', ['pgp_finger_print'], unique=False)
|
||||||
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.drop_index(op.f('ix_contact_pgp_finger_print'), table_name='contact')
|
||||||
|
# ### end Alembic commands ###
|
Loading…
Reference in New Issue
Block a user