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
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create finished audit log for privacy requests (#1040)
* Add finished AuditLog * Bump fideslib * Update test * Fix format lints * Lowercase encoding * Update changelog * Fix issue with migration downgrade * Sort lists in test data tests * format file
- Loading branch information
1 parent
ca24914
commit 0871f69
Showing
8 changed files
with
114 additions
and
53 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
32 changes: 32 additions & 0 deletions
32
src/fidesops/migrations/versions/bab75915670a_add_finished_audit_log.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,32 @@ | ||
"""Add finished audit log | ||
Revision ID: bab75915670a | ||
Revises: 3c5e1253465d | ||
Create Date: 2022-08-04 20:18:29.339116 | ||
""" | ||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "bab75915670a" | ||
down_revision = "3c5e1253465d" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.execute("alter type auditlogaction add value 'finished'") | ||
|
||
|
||
def downgrade(): | ||
op.execute("delete from auditlog where action in ('finished')") | ||
op.execute("alter type auditlogaction rename to auditlogaction_old") | ||
op.execute("create type auditlogaction as enum('approved', 'denied')") | ||
op.execute( | ||
( | ||
"alter table auditlog alter column action type auditlogaction using " | ||
"action::text::auditlogaction" | ||
) | ||
) | ||
op.execute("drop type auditlogaction_old") |
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