-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Парфенов Михаил Александрович
committed
Nov 30, 2024
1 parent
a82a2bb
commit cbf0015
Showing
3 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
migrations/versions/20181e0d6aab_make_nullable_timetable_id.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"""make nullable timetable_id | ||
Revision ID: 20181e0d6aab | ||
Revises: edcc1a448ffb | ||
Create Date: 2024-11-30 18:45:08.527638 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '20181e0d6aab' | ||
down_revision = 'edcc1a448ffb' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.drop_constraint('lecturer_timetable_id_key', 'lecturer', type_='unique') | ||
|
||
|
||
def downgrade(): | ||
op.create_unique_constraint('lecturer_timetable_id_key', 'lecturer', ['timetable_id']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters