-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
made description optional for document sets (#3407)
* made description optional for document sets * update document set optional * update alembic migration head --------- Co-authored-by: pablodanswer <[email protected]>
- Loading branch information
1 parent
c69b7fc
commit 54dcbfa
Showing
4 changed files
with
34 additions
and
5 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
backend/alembic/versions/94dc3d0236f8_make_document_set_description_optional.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,30 @@ | ||
"""make document set description optional | ||
Revision ID: 94dc3d0236f8 | ||
Revises: bf7a81109301 | ||
Create Date: 2024-12-11 11:26:10.616722 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = "94dc3d0236f8" | ||
down_revision = "bf7a81109301" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# Make document_set.description column nullable | ||
op.alter_column( | ||
"document_set", "description", existing_type=sa.String(), nullable=True | ||
) | ||
|
||
|
||
def downgrade() -> None: | ||
# Revert document_set.description column to non-nullable | ||
op.alter_column( | ||
"document_set", "description", existing_type=sa.String(), 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