Added reachable flag to device entities

This commit is contained in:
Fabio Manganiello 2022-04-29 23:27:35 +02:00
parent f45df5d4d3
commit 90f067de61
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -1,4 +1,4 @@
from sqlalchemy import Column, Integer, ForeignKey
from sqlalchemy import Column, Integer, Boolean, ForeignKey
from ._base import Entity
@ -7,6 +7,7 @@ class Device(Entity):
__tablename__ = 'device'
id = Column(Integer, ForeignKey(Entity.id, ondelete='CASCADE'), primary_key=True)
reachable = Column(Boolean, default=True)
__mapper_args__ = {
'polymorphic_identity': __tablename__,