fix: persist top/left/right connection-point counts (issue #243)
The backend only stored bottom_handles, so top/left/right_handles were dropped on canvas save and reset to defaults on reload — a left/right snappoint would vanish after reload. - models.py: add top_handles (default 1), left_handles (0), right_handles (0) - database.py: ALTER TABLE migrations for the three columns - schemas: add fields to NodeBase, NodeUpdate, and the canvas-save node schema - tests: save+reload round-trip and default-fallback coverage ha-relevant: no
This commit is contained in:
@@ -59,6 +59,9 @@ class Node(Base):
|
||||
width: Mapped[float | None] = mapped_column(Float, nullable=True)
|
||||
height: Mapped[float | None] = mapped_column(Float, nullable=True)
|
||||
bottom_handles: Mapped[int] = mapped_column(Integer, default=1)
|
||||
top_handles: Mapped[int] = mapped_column(Integer, default=1)
|
||||
left_handles: Mapped[int] = mapped_column(Integer, default=0)
|
||||
right_handles: Mapped[int] = mapped_column(Integer, default=0)
|
||||
ieee_address: Mapped[str | None] = mapped_column(String, index=True, nullable=True)
|
||||
last_seen: Mapped[datetime | None] = mapped_column(DateTime(timezone=True))
|
||||
last_scan: Mapped[datetime | None] = mapped_column(DateTime(timezone=True))
|
||||
|
||||
Reference in New Issue
Block a user