mirror of
https://github.com/simple-login/app.git
synced 2025-09-12 01:24:20 +08:00
fix: remove duplicate EmailLog index (#2371)
This commit is contained in:
parent
ff79fa020f
commit
bb6300944d
2 changed files with 24 additions and 3 deletions
|
@ -2124,9 +2124,7 @@ class EmailLog(Base, ModelMixin):
|
|||
Index("ix_email_log_user_id_email_log_id", "user_id", "id"),
|
||||
)
|
||||
|
||||
user_id = sa.Column(
|
||||
sa.ForeignKey(User.id, ondelete="cascade"), nullable=False, index=True
|
||||
)
|
||||
user_id = sa.Column(sa.ForeignKey(User.id, ondelete="cascade"), nullable=False)
|
||||
contact_id = sa.Column(
|
||||
sa.ForeignKey(Contact.id, ondelete="cascade"), nullable=False, index=True
|
||||
)
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
"""index cleanup
|
||||
|
||||
Revision ID: 97edba8794f8
|
||||
Revises: d3ff8848c930
|
||||
Create Date: 2025-01-31 14:42:22.590597
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '97edba8794f8'
|
||||
down_revision = 'd3ff8848c930'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.drop_index('ix_email_log_user_id', table_name='email_log')
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.create_index('ix_email_log_user_id', 'email_log', ['user_id'], unique=False)
|
Loading…
Add table
Reference in a new issue