Allow for workshop/meal checkins #19

Merged
Muirrum merged 6 commits from meal-checkin into master 2023-12-01 17:30:16 -05:00
2 changed files with 46 additions and 24 deletions
Showing only changes of commit 006f54255f - Show all commits

View file

@ -0,0 +1,46 @@
"""create_event_table
Revision ID: 858e0d45876f
Revises: 261c004968a4
Create Date: 2023-12-01 13:31:00.955470
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '858e0d45876f'
down_revision = '261c004968a4'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('event',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('name', sa.String(), nullable=False),
sa.Column('description', sa.String(), nullable=True),
sa.Column('location', sa.String(), nullable=False),
sa.Column('start_time', sa.DateTime(), nullable=False),
sa.Column('end_time', sa.DateTime(), nullable=False),
sa.Column('category', sa.String(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_table('event_checkins',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('event_id', sa.Integer(), nullable=False),
sa.Column('user_id', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['event_id'], ['event.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('event_checkins')
op.drop_table('event')
# ### end Alembic commands ###

View file

@ -1,24 +0,0 @@
"""create event table
Revision ID: d6917765911f
Revises: 261c004968a4
Create Date: 2023-12-01 13:22:41.055221
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'd6917765911f'
down_revision = '261c004968a4'
branch_labels = None
depends_on = None
def upgrade():
pass
def downgrade():
pass