Fix the bug of missing constraint
1. What is the problem In the resource routing table, there does not exist unique constraint on top_id and pod_id. 2. What is the solution to the problem Add constraint on the two columns. 3. What the features need to be implemented to the Tricircle No new feature is implemented. Change-Id: I13ce66a270de280ba13b0733cc1f39648e72d0eb
This commit is contained in:
parent
caeaa07dfa
commit
541fe530a7
|
@ -249,6 +249,10 @@ def upgrade(migrate_engine):
|
||||||
sql.Column('resource_type', sql.String(length=64), nullable=False),
|
sql.Column('resource_type', sql.String(length=64), nullable=False),
|
||||||
sql.Column('created_at', sql.DateTime),
|
sql.Column('created_at', sql.DateTime),
|
||||||
sql.Column('updated_at', sql.DateTime),
|
sql.Column('updated_at', sql.DateTime),
|
||||||
|
migrate.UniqueConstraint(
|
||||||
|
'top_id', 'pod_id',
|
||||||
|
name='cascaded_pods_resource_routing0top_id0pod_id'
|
||||||
|
),
|
||||||
mysql_engine='InnoDB',
|
mysql_engine='InnoDB',
|
||||||
mysql_charset='utf8')
|
mysql_charset='utf8')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue