]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Correctly inherit __table_args__ from parent class
authorDarren Birkett <darren.birkett@gmail.com>
Thu, 6 Mar 2014 16:17:03 +0000 (16:17 +0000)
committerMark McClain <mmcclain@yahoo-inc.com>
Tue, 8 Apr 2014 20:41:37 +0000 (16:41 -0400)
Where unique constraints are added to certain tables by populating
__table_args__, we need to ensure we inherit the top level
__table_args__ that define the default storage engine to use when
creating tables.

Change-Id: Ib886b84922830b60282b4f882591e43f5041e713
Fixes: bug 1288358
(cherry picked from commit 72e37ddcd067432675543c8f4d327fe766bc8044)

neutron/db/extradhcpopt_db.py
neutron/plugins/openvswitch/ovs_models_v2.py

index fabe7565132bdcd2f2d32d3f118d6a93b35947c3..4693457f7caf0be80de50985a81c796fa4417c0a 100644 (file)
@@ -43,7 +43,8 @@ class ExtraDhcpOpt(model_base.BASEV2, models_v2.HasId):
     opt_value = sa.Column(sa.String(255), nullable=False)
     __table_args__ = (sa.UniqueConstraint('port_id',
                                           'opt_name',
-                                          name='uidx_portid_optname'),)
+                                          name='uidx_portid_optname'),
+                      model_base.BASEV2.__table_args__,)
 
     # Add a relationship to the Port model in order to instruct SQLAlchemy to
     # eagerly load extra_dhcp_opts bindings
index ffb6cd0b8c62d4b848f66e4368579e3d4a0b321f..b50074cc517a913d714d5381645fe6b1b6003f17 100644 (file)
@@ -93,6 +93,7 @@ class TunnelEndpoint(model_base.BASEV2):
     __tablename__ = 'ovs_tunnel_endpoints'
     __table_args__ = (
         UniqueConstraint('id', name='uniq_ovs_tunnel_endpoints0id'),
+        model_base.BASEV2.__table_args__,
     )
 
     ip_address = Column(String(64), primary_key=True)