config/sysinv/sysinv/sysinv/sysinv/db/sqlalchemy/migrate_repo/versions/088_networktype_remove.py

25 lines
517 B
Python

# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (c) 2019 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
interface = Table('interfaces', meta, autoload=True)
interface.drop_column('networktype')
return True
def downgrade(migrate_engine):
raise NotImplementedError('SysInv database downgrade is unsupported.')