Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fidesplus#807] adds fides_user_device_id to ProvidedIdentityType Enum #3131

Merged
merged 1 commit into from
Apr 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
"""adds fides_user_device_id enum

Revision ID: 3842d1acac5f
Revises: 8342453518cc
Create Date: 2023-04-21 20:10:01.389078

"""
from alembic import op


# revision identifiers, used by Alembic.
revision = "3842d1acac5f"
down_revision = "8342453518cc"
branch_labels = None
depends_on = None


def upgrade():
op.execute("ALTER TYPE providedidentitytype RENAME TO providedidentitytype_old")
op.execute(
"CREATE TYPE providedidentitytype AS ENUM('email', 'phone_number', 'ga_client_id', 'ljt_readerID', 'fides_user_device_id')"
)
op.execute(
"ALTER TABLE providedidentity ALTER COLUMN field_name TYPE providedidentitytype USING field_name::text::providedidentitytype"
seanpreston marked this conversation as resolved.
Show resolved Hide resolved
)
op.execute("DROP TYPE providedidentitytype_old")


def downgrade():
op.execute("ALTER TYPE providedidentitytype RENAME TO providedidentitytype_old")
op.execute(
"CREATE TYPE providedidentitytype AS ENUM('email', 'phone_number', 'ga_client_id', 'ljt_readerID')"
)
op.execute(
"ALTER TABLE providedidentity ALTER COLUMN field_name TYPE providedidentitytype USING field_name::text::providedidentitytype"
)
op.execute("DROP TYPE providedidentitytype_old")
1 change: 1 addition & 0 deletions src/fides/api/ops/models/privacy_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,7 @@ class ProvidedIdentityType(EnumType):
phone_number = "phone_number"
ga_client_id = "ga_client_id"
ljt_readerID = "ljt_readerID"
fides_user_device_id = "fides_user_device_id"
seanpreston marked this conversation as resolved.
Show resolved Hide resolved


class ProvidedIdentity(Base): # pylint: disable=R0904
Expand Down