Skip to content

Commit

Permalink
s:Rename to ActiveToken
Browse files Browse the repository at this point in the history
Need to use the table names in the foreign key reference.
  • Loading branch information
portante committed Jan 6, 2023
1 parent 291b579 commit a0b534f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/pbench/server/database/models/active_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ActiveToken(Database.Base):
expiration = Column(DateTime, nullable=False, index=True)
user_id = Column(
Integer,
ForeignKey("user.id", ondelete="CASCADE"),
ForeignKey("users.id", ondelete="CASCADE"),
nullable=False,
# no need to add index=True, all FKs have indexes
)
Expand Down
2 changes: 1 addition & 1 deletion lib/pbench/server/database/models/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ class Metadata(Database.Base):
id = Column(Integer, primary_key=True, autoincrement=True)
key = Column(String(255), unique=False, nullable=False, index=True)
value = Column(JSON, unique=False, nullable=True)
dataset_ref = Column(Integer, ForeignKey("dataset.id"), nullable=False)
dataset_ref = Column(Integer, ForeignKey("datasets.id"), nullable=False)

dataset = relationship("Dataset", back_populates="metadatas", single_parent=True)
user_id = Column(String(255), nullable=True)
Expand Down

0 comments on commit a0b534f

Please sign in to comment.