-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New TCF Purpose Header Field on Translations (#5246)
- Adds a new purpose_header field on the ExperienceTranslation and on the historical record, the PrivacyExperienceConfigHistory table - Adds a data migration to populate purpose_header fields on all existing TCF translations as well as update the existing description, provided the customer is still on version 1 for that translation, meaning they've made no edits
- Loading branch information
Showing
6 changed files
with
350 additions
and
1 deletion.
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
34 changes: 34 additions & 0 deletions
34
src/fides/api/alembic/migrations/versions/1332815dcd71_purpose_header_to_translations.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,34 @@ | ||
"""purpose_header_to_translations | ||
Adds new purpose_header field to Experience Translation table and | ||
Privacy Experience Config History table | ||
Revision ID: 1332815dcd71 | ||
Revises: 9cad5a5c438c | ||
Create Date: 2024-08-28 21:05:41.933572 | ||
""" | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "1332815dcd71" | ||
down_revision = "9cad5a5c438c" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.add_column( | ||
"experiencetranslation", sa.Column("purpose_header", sa.String(), nullable=True) | ||
) | ||
op.add_column( | ||
"privacyexperienceconfighistory", | ||
sa.Column("purpose_header", sa.String(), nullable=True), | ||
) | ||
|
||
|
||
def downgrade(): | ||
op.drop_column("privacyexperienceconfighistory", "purpose_header") | ||
op.drop_column("experiencetranslation", "purpose_header") |
Oops, something went wrong.