-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add archived flag for t4c instances
- Loading branch information
1 parent
bba492a
commit 9579da7
Showing
3 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
backend/capellacollab/alembic/versions/f7bf9456cfc9_add_archive_flag.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,35 @@ | ||
# SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
"""Add archive flag | ||
Revision ID: f7bf9456cfc9 | ||
Revises: d8cf851562cd | ||
Create Date: 2023-08-28 08:57:22.931913 | ||
""" | ||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "f7bf9456cfc9" | ||
down_revision = "d8cf851562cd" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.add_column( | ||
"t4c_instances", sa.Column("is_archived", sa.Boolean(), nullable=True) | ||
) | ||
|
||
op.get_bind().execute( | ||
sa.text("UPDATE t4c_instances SET is_archived=false") | ||
) | ||
|
||
op.alter_column( | ||
"t4c_instances", | ||
"is_archived", | ||
existing_type=sa.BOOLEAN(), | ||
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