mirror of
https://github.com/koloideal/DutyLog.git
synced 2026-08-08 10:01:14 +03:00
53f30c923b
- Fix media group collection: use module-level dicts instead of dialog_data to avoid race conditions between concurrent handler calls - Add photo/media group sending in user notifications (add/remove hours) - Add admin username with emoji to all transaction detail windows - Add emoji prefixes to detail content fields - Support multiple photos via JSON array in photo_file_id column - Change photo_file_id column from String(512) to Text - Add get_photo_file_ids() helper with backward compat for single file_id - Add 'All photos' button for media groups in detail views - Remove /start photo_ deep link fallback handler - Add Alembic migration for column type change
38 lines
831 B
Python
38 lines
831 B
Python
"""change_photo_file_id_to_text
|
|
|
|
Revision ID: b2c3d4e5f6g7
|
|
Revises: a1b2c3d4e5f6
|
|
Create Date: 2026-07-15 00:35:00.000000
|
|
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
revision: str = 'b2c3d4e5f6g7'
|
|
down_revision: Union[str, Sequence[str], None] = 'a1b2c3d4e5f6'
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.alter_column(
|
|
'hours_transactions',
|
|
'photo_file_id',
|
|
existing_type=sa.String(length=512),
|
|
type_=sa.Text(),
|
|
existing_nullable=True,
|
|
)
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.alter_column(
|
|
'hours_transactions',
|
|
'photo_file_id',
|
|
existing_type=sa.Text(),
|
|
type_=sa.String(length=512),
|
|
existing_nullable=True,
|
|
)
|