config/sysinv/sysinv/sysinv/sysinv/db/sqlalchemy/migrate_repo/versions/079_network_column_remove.py

29 lines
668 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 MetaData, Table
ENGINE = 'InnoDB'
CHARSET = 'utf8'
def upgrade(migrate_engine):
meta = MetaData()
meta.bind = migrate_engine
network = Table('networks', meta, autoload=True)
network.drop_column('mtu')
network.drop_column('link_capacity')
network.drop_column('vlan_id')
return True
def downgrade(migrate_engine):
# As per other openstack components, downgrade is
# unsupported in this release.
raise NotImplementedError('SysInv database downgrade is unsupported.')