fix(mail): add notifications updated_at migration + attachment sync fix
- 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)
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
"""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")
|
||||
Reference in New Issue
Block a user