]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix cisco_csr_identifier_map.ipsec_site_conn_id
authorVladislav Belogrudov <vladislav.belogrudov@oracle.com>
Wed, 17 Jun 2015 11:02:22 +0000 (14:02 +0300)
committerVladislav Belogrudov <vladislav.belogrudov@oracle.com>
Wed, 17 Jun 2015 11:05:53 +0000 (14:05 +0300)
Some database engines require exact match of sizes of foreign keys
and referenced fields. Foreign key ipsec_site_conn_id of table
cisco_csr_identifier_map is varchar(64) but it references field
id varchar(36) of table ipsec_site_connections. This gives error
while running migration scripts in such databases.

This fix only applies to new installations. Existing databases will
be corrected by migration scripts introduced in
https://review.openstack.org/190569 - they will take care of resizing
the field and adjusting the model.

Change-Id: I6cc9625a2d96d1330b06eb727cc7fa5363c697b8
Depends-On: I384a9bbaba05ef94174b666bdcfb276eedc74134
Closes-Bug: #1463806

neutron/db/migration/alembic_migrations/cisco_init_ops.py

index 7df02a9312e2953248b5c53269e24ba762c45ee1..3c99f7b933e5038bcc65be778b49cb06dcd8e74c 100644 (file)
@@ -162,7 +162,7 @@ def upgrade():
     op.create_table(
         'cisco_csr_identifier_map',
         sa.Column('tenant_id', sa.String(length=255), nullable=True),
-        sa.Column('ipsec_site_conn_id', sa.String(length=64),
+        sa.Column('ipsec_site_conn_id', sa.String(length=36),
                   primary_key=True),
         sa.Column('csr_tunnel_id', sa.Integer(), nullable=False),
         sa.Column('csr_ike_policy_id', sa.Integer(), nullable=False),