2022-07-23 20:35:42 +02:00
|
|
|
"""Create tasks
|
|
|
|
|
|
|
|
Revision ID: 346b408c362a
|
|
|
|
Revises: 1716bfecf684
|
|
|
|
Create Date: 2022-07-23 19:41:07.029482
|
|
|
|
|
|
|
|
"""
|
|
|
|
import sqlalchemy as sa
|
|
|
|
|
|
|
|
from alembic import op
|
|
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
|
|
revision = "346b408c362a"
|
|
|
|
down_revision = "1716bfecf684"
|
|
|
|
branch_labels = None
|
|
|
|
depends_on = None
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade() -> None:
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
|
|
op.create_table(
|
|
|
|
"tasks",
|
|
|
|
sa.Column("task_id", sa.Integer(), nullable=False),
|
|
|
|
sa.Column("task", sa.Enum("BIRTHDAYS", "UFORA_ANNOUNCEMENTS", name="tasktype"), nullable=False),
|
|
|
|
sa.Column("previous_run", sa.DateTime(), nullable=True),
|
|
|
|
sa.PrimaryKeyConstraint("task_id"),
|
|
|
|
sa.UniqueConstraint("task"),
|
|
|
|
)
|
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
|
|
|
|
|
|
def downgrade() -> None:
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
|
|
op.drop_table("tasks")
|
2022-07-23 20:59:02 +02:00
|
|
|
sa.Enum("BIRTHDAYS", "UFORA_ANNOUNCEMENTS", name="tasktype").drop(op.get_bind())
|
2022-07-23 20:35:42 +02:00
|
|
|
# ### end Alembic commands ###
|