Add a cron_setup
task to initialize code-defined cron tasks.
This commit is contained in:
parent
b4fecddf7b
commit
7ea3c81967
5 changed files with 88 additions and 1 deletions
|
@ -0,0 +1,30 @@
|
|||
"""add cron labels
|
||||
|
||||
Revision ID: 0cd3a7ebef3f
|
||||
Revises: 6b6c1b21a487
|
||||
Create Date: 2023-04-22 07:57:45.164146+00:00
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '0cd3a7ebef3f'
|
||||
down_revision = '6b6c1b21a487'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('tasks_repeatable', sa.Column('label', sa.String(), nullable=True))
|
||||
op.create_unique_constraint(None, 'tasks_repeatable', ['label'])
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_constraint(None, 'tasks_repeatable', type_='unique')
|
||||
op.drop_column('tasks_repeatable', 'label')
|
||||
# ### end Alembic commands ###
|
Loading…
Add table
Add a link
Reference in a new issue