-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #144 from python-discord/jb3/deleted-category-attr…
…ibute Category deletion tracking
- Loading branch information
Showing
3 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
alembic/versions/01b101590e74_add_deleted_column_to_category_model.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,31 @@ | ||
""" | ||
Add deleted column to Category model. | ||
Revision ID: 01b101590e74 | ||
Revises: c09a64cac3cb | ||
Create Date: 2024-04-08 04:39:00.198882 | ||
""" | ||
import sqlalchemy as sa | ||
|
||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "01b101590e74" | ||
down_revision = "c09a64cac3cb" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
"""Apply the current migration.""" | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column("categories", sa.Column("deleted", sa.Boolean(), nullable=False)) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
"""Revert the current migration.""" | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column("categories", "deleted") | ||
# ### end Alembic commands ### |
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