blob: 9f53cd6991ad88f41412880243ce9c80c09c260b [file] [log] [blame]
# -*- coding: utf-8 -*-
# Copyright 2020 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
class HostAttribute(declarative_base()):
"""Arbitrary keyvals associated with hosts."""
__tablename__ = "afe_host_attributes"
SERIALIZATION_LINKS_TO_KEEP = {"host"}
SERIALIZATION_LOCAL_LINKS_TO_UPDATE = {"value"}
id = Column(Integer, primary_key=True)
host_id = Column(Integer, nullable=False)
attribute = Column(String(length=90), nullable=False)
value = Column(String(length=300), nullable=False)