mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-07 23:55:46 +02:00
Create reminders, fix bugs in schedule parsing
This commit is contained in:
parent
00a146cb2b
commit
d03ece6f58
9 changed files with 199 additions and 17 deletions
38
alembic/versions/a64876b41af2_add_reminders.py
Normal file
38
alembic/versions/a64876b41af2_add_reminders.py
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
"""Add reminders
|
||||
|
||||
Revision ID: a64876b41af2
|
||||
Revises: c1f9ee875616
|
||||
Create Date: 2022-09-23 13:37:10.331840
|
||||
|
||||
"""
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "a64876b41af2"
|
||||
down_revision = "c1f9ee875616"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table(
|
||||
"reminders",
|
||||
sa.Column("reminder_id", sa.Integer(), nullable=False),
|
||||
sa.Column("user_id", sa.BigInteger(), nullable=True),
|
||||
sa.Column("category", sa.Enum("LES", name="remindercategory"), nullable=False),
|
||||
sa.ForeignKeyConstraint(
|
||||
["user_id"],
|
||||
["users.user_id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("reminder_id"),
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table("reminders")
|
||||
# ### end Alembic commands ###
|
||||
Loading…
Add table
Add a link
Reference in a new issue