This repository has been archived by the owner on Nov 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
414- adds DRP action to Policy #453
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
3a97760
adds drp action type to db, adds docs, tests
eastandwestwind dc21acf
fix lint, tests
eastandwestwind 34a1414
format
eastandwestwind d51fd31
remove unneeded func arg
eastandwestwind 7d7f50a
lint
eastandwestwind 9d1ee92
more lint
eastandwestwind e0927f5
CR changes
eastandwestwind 1b011d4
update alembic down migration number
eastandwestwind 734b543
minor docs updates for drp
71665b9
integration tests and updating alembic
eastandwestwind e0b6d1d
Merge branch '414-drp-action' of github.com:ethyca/fidesops into 414-…
eastandwestwind fa6c82a
catches integrity error at endpoint level
eastandwestwind c41c2dc
lint
eastandwestwind File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
40 changes: 40 additions & 0 deletions
40
src/migrations/versions/5078badb90b9_adds_drp_action_to_policy.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,40 @@ | ||
"""adds DRP action to policy | ||
|
||
Revision ID: 5078badb90b9 | ||
Revises: c98da12d76f8 | ||
Create Date: 2022-05-04 17:22:46.500067 | ||
|
||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
from sqlalchemy.dialects import postgresql | ||
|
||
revision = "5078badb90b9" | ||
down_revision = "c98da12d76f8" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
drpaction = postgresql.ENUM( | ||
"access", | ||
"deletion", | ||
"sale_opt_out", | ||
"sale_opt_in", | ||
"access_categories", | ||
"access_specific", | ||
name="drpaction", | ||
create_type=False, | ||
) | ||
drpaction.create(op.get_bind()) | ||
op.add_column("policy", sa.Column("drp_action", drpaction, nullable=True)) | ||
op.create_index(op.f("ix_policy_drp_action"), "policy", ["drp_action"], unique=True) | ||
|
||
|
||
def downgrade(): | ||
op.drop_index(op.f("ix_policy_drp_action"), table_name="policy") | ||
op.drop_column("policy", "drp_action") | ||
op.execute("DROP TYPE drpaction;") |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making this change!