[rhmessaging-commits] rhmessaging commits: r2006 - in mgmt/mint: sql and 1 other directory.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Thu May 8 12:05:36 EDT 2008
Author: justi9
Date: 2008-05-08 12:05:36 -0400 (Thu, 08 May 2008)
New Revision: 2006
Modified:
mgmt/mint/python/mint/__init__.py
mgmt/mint/sql/schema.sql
Log:
Unique constraint for host,port on BrokerRegistration
Modified: mgmt/mint/python/mint/__init__.py
===================================================================
--- mgmt/mint/python/mint/__init__.py 2008-05-08 15:42:30 UTC (rev 2005)
+++ mgmt/mint/python/mint/__init__.py 2008-05-08 16:05:36 UTC (rev 2006)
@@ -47,6 +47,8 @@
cluster = ForeignKey("BrokerCluster", cascade="null", default=None)
profile = ForeignKey("BrokerProfile", cascade="null", default=None)
+ host_port_unique = index.DatabaseIndex(host, port, unique=True)
+
def connect(self, model):
log.info("Connecting to broker '%s' at %s:%i" % \
(self.name, self.host, self.port or 5672))
Modified: mgmt/mint/sql/schema.sql
===================================================================
--- mgmt/mint/sql/schema.sql 2008-05-08 15:42:30 UTC (rev 2005)
+++ mgmt/mint/sql/schema.sql 2008-05-08 16:05:36 UTC (rev 2006)
@@ -29,6 +29,7 @@
cluster_id INT,
profile_id INT
);
+CREATE UNIQUE INDEX broker_registration_host_port_unique ON broker_registration (host, port);
CREATE TABLE config_property (
id SERIAL PRIMARY KEY,
More information about the rhmessaging-commits
mailing list