-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure that empty subtitles - ie those with a value of None - are set…
… to null in the database rather than the string "None" (#2249)
- Loading branch information
1 parent
f598128
commit f417b02
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
alembic/versions/20250114_c800cc42184a_set_none_subtitles_to_null.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,23 @@ | ||
"""Set none subtitles to null | ||
Revision ID: c800cc42184a | ||
Revises: 579786fecbf4 | ||
Create Date: 2025-01-14 18:36:21.116427+00:00 | ||
""" | ||
|
||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "c800cc42184a" | ||
down_revision = "579786fecbf4" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
op.execute("update editions set subtitle = null where subtitle = 'None'") | ||
|
||
|
||
def downgrade() -> None: | ||
pass |
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