Skip to content

Commit

Permalink
Migration to add start/end dates to courses
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospri committed Jan 8, 2025
1 parent 70d97cf commit 145f4b2
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""Add start and end dates to courses."""

import sqlalchemy as sa
from alembic import op

revision = "0aa54a98ad39"
down_revision = "02d413b4d212"


def upgrade() -> None:
op.add_column("lms_course", sa.Column("starts_at", sa.DateTime(), nullable=True))
op.add_column("lms_course", sa.Column("ends_at", sa.DateTime(), nullable=True))


def downgrade() -> None:
op.drop_column("lms_course", "ends_at")
op.drop_column("lms_course", "starts_at")

0 comments on commit 145f4b2

Please sign in to comment.