[verified] feat: support monthly completion recurrence
ci / gitleaks (push) Successful in 23s
ci / docker (push) Successful in 7m16s

This commit is contained in:
2026-09-20 21:04:31 +08:00
parent e6d720b85c
commit 3155155f53
13 changed files with 193 additions and 39 deletions
@@ -0,0 +1,29 @@
"""add after_completion unit
Revision ID: 0021_after_completion_unit
Revises: 0020_calendar_subscriptions
"""
import sqlalchemy as sa
from alembic import op
revision = "0021_after_completion_unit"
down_revision = "0020_calendar_subscriptions"
branch_labels = None
depends_on = None
def upgrade() -> None:
with op.batch_alter_table("recurrence_templates") as batch_op:
batch_op.add_column(
sa.Column("after_completion_unit", sa.String(length=8), nullable=True)
)
op.execute(
"UPDATE recurrence_templates SET after_completion_unit = 'days' "
"WHERE trigger_mode = 'after_completion'"
)
def downgrade() -> None:
with op.batch_alter_table("recurrence_templates") as batch_op:
batch_op.drop_column("after_completion_unit")