Defer loading of profile pic

This commit is contained in:
Peter Stockings
2026-03-10 19:34:37 +11:00
parent 808143f92b
commit 5b43bca7ca
6 changed files with 60 additions and 33 deletions

View File

@@ -0,0 +1,32 @@
"""Add user id index on profile
Revision ID: bd83e779fcc1
Revises: 8cfe56a1e597
Create Date: 2026-03-10 19:33:12.629077
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'bd83e779fcc1'
down_revision = '8cfe56a1e597'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('profile', schema=None) as batch_op:
batch_op.create_index(batch_op.f('ix_profile_user_id'), ['user_id'], unique=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('profile', schema=None) as batch_op:
batch_op.drop_index(batch_op.f('ix_profile_user_id'))
# ### end Alembic commands ###