generated from cfpb/open-source-project-template
-
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.
474 update is voluntary field to be nullable (#475)
Closes #474 Need to update either this or #473 due to each PR have an alembic script, so will need to make whichever PR is reviewed/approved last alembic based on the first PR merged in.
- Loading branch information
Showing
7 changed files
with
48 additions
and
14 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
db_revisions/versions/63138f5cf036_change_is_voluntary_to_nullable.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,28 @@ | ||
"""change is_voluntary to nullable | ||
Revision ID: 63138f5cf036 | ||
Revises: 26f11ac15b3c | ||
Create Date: 2024-10-28 14:22:58.391354 | ||
""" | ||
|
||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = "63138f5cf036" | ||
down_revision: Union[str, None] = "26f11ac15b3c" | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
with op.batch_alter_table("filing", schema=None) as batch_op: | ||
batch_op.alter_column("is_voluntary", nullable=True) | ||
|
||
|
||
def downgrade() -> None: | ||
with op.batch_alter_table("filing", schema=None) as batch_op: | ||
batch_op.alter_column("is_voluntary", nullable=False) |
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
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
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