[verified] feat: support monthly completion recurrence
This commit is contained in:
@@ -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")
|
||||
Reference in New Issue
Block a user