config/sysinv/sysinv/sysinv/sysinv/db/sqlalchemy/migrate_repo/versions/070_fm_add_degrade_affectin...

28 lines
696 B
Python

# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (c) 2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
from sqlalchemy import String
from sqlalchemy import Column, MetaData, Table
ENGINE = 'InnoDB'
CHARSET = 'utf8'
def upgrade(migrate_engine):
meta = MetaData()
meta.bind = migrate_engine
event_suppression = Table('event_suppression', meta, autoload=True)
event_suppression.create_column(Column('degrade_affecting', String(255)))
return True
def downgrade(migrate_engine):
# As per other openstack components, downgrade is
# unsupported in this release.
raise NotImplementedError('SysInv database downgrade is unsupported.')