1701361e92
- Migration 0020: Add updated_at column to notifications table (was missing, causing sync failures) - IMAP sync now saves attachments for existing emails (retroactive attachment saving) - Replace silent exception with logger.warning for attachment save failures - Sync verified: 37 attachments now stored in database (was 0 before)
31 lines
557 B
Python
31 lines
557 B
Python
"""Add updated_at column to notifications table.
|
|
|
|
Revision ID: 0020
|
|
Revises: 0019
|
|
Create Date: 2026-07-16
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
revision = "0020"
|
|
down_revision = "0019"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.add_column(
|
|
"notifications",
|
|
sa.Column(
|
|
"updated_at",
|
|
sa.DateTime(timezone=True),
|
|
nullable=False,
|
|
server_default=sa.func.now(),
|
|
),
|
|
)
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_column("notifications", "updated_at")
|