Skip to content

Commit

Permalink
Add AuthToken.API_KEY SQL ENUM (#3398)
Browse files Browse the repository at this point in the history
PBENCH-1136

Stage one: this doesn't fix the API key encryption problem (Nikhil is working
on that), but this adds the missing SQL ENUM value.

Rather than creating a new Alembic revision file (which would be the normal
process) I decided to keep this simple by updating the general API KEY
revision file. As we have no database deployments we'll need to upgrade over
this period, this strategy avoids adding another revision to the tree.
  • Loading branch information
dbutenhof committed Apr 25, 2023
1 parent ded34c1 commit 0d5dff1
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -31,6 +31,7 @@ def upgrade() -> None:
),
sa.PrimaryKeyConstraint("api_key"),
)
op.execute("ALTER TYPE audittype ADD VALUE 'API_KEY'")
op.drop_index("ix_auth_tokens_expiration", table_name="auth_tokens")
op.drop_index("ix_auth_tokens_token", table_name="auth_tokens")
op.drop_table("auth_tokens")
Expand Down

0 comments on commit 0d5dff1

Please sign in to comment.