mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-07 23:55:46 +02:00
Start working on events
This commit is contained in:
parent
1ae7790ca2
commit
5deb312474
7 changed files with 203 additions and 1 deletions
36
alembic/versions/954ad804f057_add_events_table.py
Normal file
36
alembic/versions/954ad804f057_add_events_table.py
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
"""Add events table
|
||||
|
||||
Revision ID: 954ad804f057
|
||||
Revises: 9fb84b4d9f0b
|
||||
Create Date: 2023-02-02 22:20:23.107931
|
||||
|
||||
"""
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "954ad804f057"
|
||||
down_revision = "9fb84b4d9f0b"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table(
|
||||
"events",
|
||||
sa.Column("event_id", sa.Integer(), nullable=False),
|
||||
sa.Column("name", sa.Text(), nullable=False),
|
||||
sa.Column("description", sa.Text(), nullable=True),
|
||||
sa.Column("notification_channel", sa.BigInteger(), nullable=False),
|
||||
sa.Column("timestamp", sa.DateTime(timezone=True), nullable=False),
|
||||
sa.PrimaryKeyConstraint("event_id"),
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table("events")
|
||||
# ### end Alembic commands ###
|
||||
Loading…
Add table
Add a link
Reference in a new issue