Skip to content

Commit

Permalink
Move the token column from the APIKEY table to the SERVICE table
Browse files Browse the repository at this point in the history
Remove the APIKEY table from the entire database schema

Signed-off-by: Akashdeep Dhar <[email protected]>
  • Loading branch information
gridhead committed Jul 12, 2024
1 parent ba14c64 commit 819fde0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
21 changes: 0 additions & 21 deletions webhook_to_fedora_messaging/models/apikey.py

This file was deleted.

3 changes: 3 additions & 0 deletions webhook_to_fedora_messaging/models/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@

from webhook_to_fedora_messaging.database import Base

from uuid import uuid4


class Service(Base, UUIDCreatableMixin, CreatableMixin):
__tablename__ = "services"

id = Column(Integer, primary_key=True, nullable=False)
user_id = Column(Integer, ForeignKey("users.id", ondelete="CASCADE"), unique=False, nullable=False)
token = Column(UnicodeText, unique=False, nullable=False, default=uuid4().hex)
name = Column(UnicodeText, nullable=False)
type = Column(UnicodeText, nullable=False)
desc = Column(UnicodeText, nullable=False)
Expand Down

0 comments on commit 819fde0

Please sign in to comment.