fix:每日推荐修复
This commit is contained in:
31
server/alembic/versions/0003_add_push_send_log_payload.py
Normal file
31
server/alembic/versions/0003_add_push_send_log_payload.py
Normal file
@@ -0,0 +1,31 @@
|
||||
"""add push_send_log payload snapshot
|
||||
|
||||
Revision ID: 0003_add_push_send_log_payload
|
||||
Revises: 0002_init_push_tables
|
||||
Create Date: 2026-02-12
|
||||
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "0003_add_push_send_log_payload"
|
||||
down_revision = "0002_init_push_tables"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.add_column("push_send_log", sa.Column("content_id", sa.Integer(), nullable=True, comment="推送文案内容 ID(可选)"))
|
||||
op.add_column("push_send_log", sa.Column("title", sa.String(length=128), nullable=True, comment="推送标题(可选)"))
|
||||
op.add_column("push_send_log", sa.Column("body", sa.Text(), nullable=True, comment="推送正文(可选)"))
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_column("push_send_log", "body")
|
||||
op.drop_column("push_send_log", "title")
|
||||
op.drop_column("push_send_log", "content_id")
|
||||
|
||||
Reference in New Issue
Block a user