Fix cisco_csr_identifier_map.ipsec_site_conn_id

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
This commit is contained in:
Vladislav Belogrudov 2015-06-17 14:02:22 +03:00
parent 03a5626f1d
commit 76dd333167

View 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),