#10 Made endpoint to create a new assignment

This commit is contained in:
2023-04-13 18:44:43 -04:00
parent 2b071d35c8
commit 389f71c2f8
3 changed files with 79 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
"""Added due date to assignment model
Revision ID: 1e88e783d238
Revises: cab0d39ef662
Create Date: 2023-04-13 18:33:37.785568
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1e88e783d238'
down_revision = 'cab0d39ef662'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('assignment', schema=None) as batch_op:
batch_op.add_column(sa.Column('due_date', sa.DateTime(), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('assignment', schema=None) as batch_op:
batch_op.drop_column('due_date')
# ### end Alembic commands ###