Skip to content

Commit

Permalink
changed schedule_id to varchar
Browse files Browse the repository at this point in the history
  • Loading branch information
justintroy committed Dec 18, 2023
1 parent f404318 commit bd5a3ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions app/api/schedule/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ def upsert_user_schedules(db: Session, user_id: str, schedules: list[Schedule]):
[
{
"created_at": datetime.utcnow(),
"schedule_id": str(uuid.uuid4()),
"user_id": user_id,
**entry.dict(
exclude={
"schedule_id",
"created_at",
"deleted_at",
"updated_at",
Expand Down
4 changes: 2 additions & 2 deletions app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Questions(Base):
class Inventory(Base):
__tablename__ = "inventory"

inventory_id = Column(UUID, unique=True, nullable=False)
inventory_id = Column(String, unique=True, nullable=False)
user_id = Column(UUID, primary_key=True, nullable=False)
created_at = Column(DateTime, nullable=True)
updated_at = Column(DateTime, nullable=True)
Expand All @@ -61,7 +61,7 @@ class Inventory(Base):
class Schedule(Base):
__tablename__ = "schedule"

schedule_id = Column(UUID, unique=True, nullable=False)
schedule_id = Column(String, unique=True, nullable=False)
user_id = Column(UUID, primary_key=True, nullable=False)
created_at = Column(DateTime, nullable=True)
updated_at = Column(DateTime, nullable=True)
Expand Down

0 comments on commit bd5a3ef

Please sign in to comment.