mirror of https://github.com/stijndcl/didier
37 lines
1017 B
Python
37 lines
1017 B
Python
"""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")
|
|
sa.Enum("BIRTHDAYS", "UFORA_ANNOUNCEMENTS", name="tasktype").drop(op.get_bind())
|
|
# ### end Alembic commands ###
|