Skip to content

Commit

Permalink
rename audit table
Browse files Browse the repository at this point in the history
  • Loading branch information
axiomofjoy committed Aug 8, 2024
1 parent 2660186 commit eea99d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def upgrade() -> None:
),
)
op.create_table(
"api_keys_actions",
"audit_api_keys",
sa.Column("id", sa.Integer, primary_key=True),
sa.Column(
"api_key_id",
Expand Down Expand Up @@ -286,7 +286,7 @@ def upgrade() -> None:


def downgrade() -> None:
op.drop_table("api_keys_actions")
op.drop_table("audit_api_keys")
op.drop_table("api_keys")
op.drop_table("users")
op.drop_table("user_roles")
4 changes: 2 additions & 2 deletions src/phoenix/db/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,8 +658,8 @@ class APIKey(Base):
expires_at: Mapped[Optional[datetime]] = mapped_column(UtcTimeStamp)


class APIKeysAction(Base):
__tablename__ = "api_keys_actions"
class AuditAPIKey(Base):
__tablename__ = "audit_api_keys"
id: Mapped[int] = mapped_column(primary_key=True)
api_key_id: Mapped[int] = mapped_column(
ForeignKey("api_keys.id"),
Expand Down

0 comments on commit eea99d9

Please sign in to comment.