-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fides: add
System
model support for new tcf fields (#4228)
Co-authored-by: Dawn Pattison <[email protected]>
- Loading branch information
Showing
9 changed files
with
344 additions
and
8 deletions.
There are no files selected for viewing
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
89 changes: 89 additions & 0 deletions
89
src/fides/api/alembic/migrations/versions/c5a218831820_additional_tcf_fields_system.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,89 @@ | ||
"""additional tcf fields system | ||
Revision ID: c5a218831820 | ||
Revises: 81226042d7d4 | ||
Create Date: 2023-10-05 15:40:09.294013 | ||
""" | ||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "c5a218831820" | ||
down_revision = "81226042d7d4" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.add_column( | ||
"ctl_systems", | ||
sa.Column("cookie_max_age_seconds", sa.Integer(), nullable=True), | ||
) | ||
op.add_column( | ||
"ctl_systems", | ||
sa.Column( | ||
"uses_cookies", | ||
sa.Boolean(), | ||
nullable=False, | ||
server_default="f", | ||
), | ||
) | ||
op.add_column( | ||
"ctl_systems", | ||
sa.Column( | ||
"cookie_refresh", | ||
sa.Boolean(), | ||
nullable=False, | ||
server_default="f", | ||
), | ||
) | ||
op.add_column( | ||
"ctl_systems", | ||
sa.Column( | ||
"uses_non_cookie_access", | ||
sa.Boolean(), | ||
nullable=False, | ||
server_default="f", | ||
), | ||
) | ||
op.add_column( | ||
"ctl_systems", | ||
sa.Column("legitimate_interest_disclosure_url", sa.String(), nullable=True), | ||
) | ||
|
||
op.add_column( | ||
"privacydeclaration", | ||
sa.Column( | ||
"flexible_legal_basis_for_processing", | ||
sa.Boolean(), | ||
nullable=True, | ||
), | ||
) | ||
|
||
|
||
def downgrade(): | ||
op.drop_column( | ||
"ctl_systems", | ||
"cookie_max_age_seconds", | ||
) | ||
op.drop_column( | ||
"ctl_systems", | ||
"uses_cookies", | ||
) | ||
op.drop_column( | ||
"ctl_systems", | ||
"cookie_refresh", | ||
) | ||
op.drop_column( | ||
"ctl_systems", | ||
"uses_non_cookie_access", | ||
) | ||
op.drop_column( | ||
"ctl_systems", | ||
"legitimate_interest_disclosure_url", | ||
) | ||
op.drop_column( | ||
"privacydeclaration", | ||
"flexible_legal_basis_for_processing", | ||
) |
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
Oops, something went wrong.