This repository has been archived by the owner on Aug 12, 2024. It is now read-only.
-
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.
backend: add route description field
- Loading branch information
1 parent
e6065d8
commit 317983c
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
backend/alembic/versions/4183de971218_add_route_description.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,29 @@ | ||
"""add route description | ||
Revision ID: 4183de971218 | ||
Revises: 8166e12f260c | ||
Create Date: 2024-03-24 12:31:02.141874 | ||
""" | ||
|
||
from typing import Sequence, Union | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = "4183de971218" | ||
down_revision: Union[str, None] = "8166e12f260c" | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
op.add_column( | ||
"routes", | ||
sa.Column("description", sa.String(255), nullable=False, server_default=""), | ||
) | ||
|
||
|
||
def downgrade() -> None: | ||
op.drop_column("routes", "description") |
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