Fix field sizes for VM names
The VM names table needs to increase the lengths, in order to support
the max sizes from their sources (Nova and Neutron).
Change-Id: Ie2cb0c596c01d6a9e31db3488f8213da002de846
(cherry picked from commit 37a7edc08a
)
This commit is contained in:
parent
e06ec19665
commit
1bce79f10a
|
@ -0,0 +1,41 @@
|
|||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
"""Fix device ID and VM lengths in VM names table
|
||||
|
||||
Revision ID: 799f0516bc08
|
||||
Revises: 7eaf537d927f
|
||||
Create Date: 2020-05-15 14:18:11.909757
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '799f0516bc08'
|
||||
down_revision = '7eaf537d927f'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.alter_column('apic_aim_vm_names',
|
||||
'device_id',
|
||||
existing_type=sa.String(36),
|
||||
type_=sa.String(255), nullable=False)
|
||||
op.alter_column('apic_aim_vm_names',
|
||||
'vm_name',
|
||||
existing_type=sa.String(64),
|
||||
type_=sa.String(255), nullable=False)
|
||||
|
||||
|
||||
def downgrade():
|
||||
pass
|
|
@ -1 +1 @@
|
|||
7eaf537d927f
|
||||
799f0516bc08
|
||||
|
|
|
@ -104,8 +104,8 @@ class HAIPAddressToPortAssociation(model_base.BASEV2):
|
|||
class VMName(model_base.BASEV2):
|
||||
__tablename__ = 'apic_aim_vm_names'
|
||||
|
||||
device_id = sa.Column(sa.String(36), primary_key=True)
|
||||
vm_name = sa.Column(sa.String(64))
|
||||
device_id = sa.Column(sa.String(255), primary_key=True)
|
||||
vm_name = sa.Column(sa.String(255))
|
||||
|
||||
|
||||
# At any point of time, there should only be one entry in this table.
|
||||
|
|
Loading…
Reference in New Issue