Skip to content

Commit

Permalink
fix: added table args
Browse files Browse the repository at this point in the history
  • Loading branch information
pehlicd committed Jun 5, 2024
1 parent 4454564 commit 9e4300b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions keep/api/models/db/provider.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
from datetime import datetime
from typing import Optional

from sqlalchemy import UniqueConstraint
from sqlmodel import JSON, Column, Field, SQLModel


class Provider(SQLModel, table=True):
__table_args__ = (UniqueConstraint("tenant_id", "name"),)

id: str = Field(default=None, primary_key=True)
tenant_id: str = Field(foreign_key="tenant.id")
name: str = Field(unique=True)
Expand Down

0 comments on commit 9e4300b

Please sign in to comment.