feat(admin): 系统通知功能增加图片支持 - 在SystemNotification模型中添加image_urls字段用于存储图片URL列表 - 实现通知图片的上传、保存和展示功能 - 前端模板增加图片预览模态框和图片上传组件 - 优化通知管理页面的UI布局,支持多图展示 - 完善图片相关的前后端交互逻辑和错误处理 ```
25 lines
493 B
Python
25 lines
493 B
Python
"""add notification images
|
|
|
|
Revision ID: b3f4c2d9aa10
|
|
Revises: 0cc7ce54ecc0
|
|
Create Date: 2026-04-24 23:20:00.000000
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'b3f4c2d9aa10'
|
|
down_revision = '0cc7ce54ecc0'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
op.add_column('system_notifications', sa.Column('image_urls', sa.Text(), nullable=True))
|
|
|
|
|
|
def downgrade():
|
|
op.drop_column('system_notifications', 'image_urls')
|