Adding ability to update / patch by sku, adding uniqueness constraint violation checks

This commit is contained in:
Ian Roddis committed 2026-09-21 10:43:36 -03:00
1 parent af5343da0c
commit d8db87c13e
13 files changed
+541 -13

No files matched your search

+3 -1
View File
@@ -17,7 +17,9 @@ class AugmentedPart(Base):
__tablename__ = "augmented_parts"
id: Mapped[int] = mapped_column(primary_key=True)
sku: Mapped[str | None] = mapped_column(String, nullable=True, default=None)
sku: Mapped[str | None] = mapped_column(
String, nullable=True, unique=True, default=None
)
description: Mapped[str] = mapped_column(String, nullable=False)
colour_id: Mapped[int] = mapped_column(
ForeignKey("part_colours.id", ondelete="RESTRICT"), nullable=False