Browse Source

Bug: host type should be nullable

Host type needs to be nullable as it can be given as list where
the type is yet not known.

Change-Id: Ie332281d3050e58fba9ae40cfb5e52b624c49cc5
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
changes/34/647734/1
Tomi Juvonen 3 years ago
parent
commit
ac9fe415e6
  1. 2
      fenix/db/migration/alembic_migrations/versions/001_initial.py
  2. 2
      fenix/db/sqlalchemy/models.py

2
fenix/db/migration/alembic_migrations/versions/001_initial.py

@ -53,7 +53,7 @@ def upgrade():
sa.Column('session_id', sa.String(36),
sa.ForeignKey('sessions.session_id')),
sa.Column('hostname', sa.String(length=255), nullable=False),
sa.Column('type', sa.String(length=32), nullable=False),
sa.Column('type', sa.String(length=32), nullable=True),
sa.Column('maintained', sa.Boolean, default=False),
sa.Column('disabled', sa.Boolean, default=False),
sa.Column('details', sa.String(length=255), nullable=True),

2
fenix/db/sqlalchemy/models.py

@ -94,7 +94,7 @@ class MaintenanceHost(mb.FenixBase):
session_id = sa.Column(sa.String(36), sa.ForeignKey('sessions.session_id'),
nullable=False)
hostname = sa.Column(sa.String(length=255), primary_key=True)
type = sa.Column(sa.String(length=32), nullable=False)
type = sa.Column(sa.String(length=32), nullable=True)
maintained = sa.Column(sa.Boolean, default=False)
disabled = sa.Column(sa.Boolean, default=False)
details = sa.Column(sa.String(length=255), nullable=True)

Loading…
Cancel
Save