[rhmessaging-commits] rhmessaging commits: r2419 - in mgmt/trunk/mint: sql and 1 other directory.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Fri Sep 5 11:45:47 EDT 2008


Author: nunofsantos
Date: 2008-09-05 11:45:46 -0400 (Fri, 05 Sep 2008)
New Revision: 2419

Modified:
   mgmt/trunk/mint/python/mint/schema.py
   mgmt/trunk/mint/sql/schema.sql
Log:
handle 2-part id, rebuilt schema

Modified: mgmt/trunk/mint/python/mint/schema.py
===================================================================
--- mgmt/trunk/mint/python/mint/schema.py	2008-09-05 15:44:05 UTC (rev 2418)
+++ mgmt/trunk/mint/python/mint/schema.py	2008-09-05 15:45:46 UTC (rev 2419)
@@ -6,8 +6,9 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
+  idSourceScope = BigIntCol(default=None)
+  idSourceObject = BigIntCol(default=None)
   creationTime = TimestampCol(default=None)
   deletionTime = TimestampCol(default=None)
   managedBroker = StringCol(length=1000, default=None)
@@ -26,7 +27,6 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
   system = ForeignKey('System', cascade='null', default=None)
   classInfos = dict() # brokerId => classInfo
@@ -38,8 +38,9 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
+  idSourceScope = BigIntCol(default=None)
+  idSourceObject = BigIntCol(default=None)
   creationTime = TimestampCol(default=None)
   deletionTime = TimestampCol(default=None)
   managedBroker = StringCol(length=1000, default=None)
@@ -102,7 +103,6 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
   broker = ForeignKey('Broker', cascade='null', default=None)
   classInfos = dict() # brokerId => classInfo
@@ -114,8 +114,9 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
+  idSourceScope = BigIntCol(default=None)
+  idSourceObject = BigIntCol(default=None)
   creationTime = TimestampCol(default=None)
   deletionTime = TimestampCol(default=None)
   managedBroker = StringCol(length=1000, default=None)
@@ -124,7 +125,7 @@
   classInfos = dict() # brokerId => classInfo
   clientConnection = ForeignKey('ClientConnection', cascade='null', default=None)
   label = StringCol(length=1000, default=None)
-  registeredTo = BigIntCol(default=None)
+  broker = ForeignKey('Broker', cascade='null', default=None)
   systemId = BLOBCol(default=None)
   objectIdBank = IntCol(default=None)
 
@@ -133,7 +134,6 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
   agent = ForeignKey('Agent', cascade='null', default=None)
   classInfos = dict() # brokerId => classInfo
@@ -145,8 +145,9 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
+  idSourceScope = BigIntCol(default=None)
+  idSourceObject = BigIntCol(default=None)
   creationTime = TimestampCol(default=None)
   deletionTime = TimestampCol(default=None)
   managedBroker = StringCol(length=1000, default=None)
@@ -161,7 +162,6 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
   vhost = ForeignKey('Vhost', cascade='null', default=None)
   classInfos = dict() # brokerId => classInfo
@@ -173,8 +173,9 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
+  idSourceScope = BigIntCol(default=None)
+  idSourceObject = BigIntCol(default=None)
   creationTime = TimestampCol(default=None)
   deletionTime = TimestampCol(default=None)
   managedBroker = StringCol(length=1000, default=None)
@@ -202,7 +203,6 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
   queue = ForeignKey('Queue', cascade='null', default=None)
   classInfos = dict() # brokerId => classInfo
@@ -249,8 +249,9 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
+  idSourceScope = BigIntCol(default=None)
+  idSourceObject = BigIntCol(default=None)
   creationTime = TimestampCol(default=None)
   deletionTime = TimestampCol(default=None)
   managedBroker = StringCol(length=1000, default=None)
@@ -267,7 +268,6 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
   exchange = ForeignKey('Exchange', cascade='null', default=None)
   classInfos = dict() # brokerId => classInfo
@@ -291,8 +291,9 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
+  idSourceScope = BigIntCol(default=None)
+  idSourceObject = BigIntCol(default=None)
   creationTime = TimestampCol(default=None)
   deletionTime = TimestampCol(default=None)
   managedBroker = StringCol(length=1000, default=None)
@@ -309,7 +310,6 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
   binding = ForeignKey('Binding', cascade='null', default=None)
   classInfos = dict() # brokerId => classInfo
@@ -322,8 +322,9 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
+  idSourceScope = BigIntCol(default=None)
+  idSourceObject = BigIntCol(default=None)
   creationTime = TimestampCol(default=None)
   deletionTime = TimestampCol(default=None)
   managedBroker = StringCol(length=1000, default=None)
@@ -346,7 +347,6 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
   clientConnection = ForeignKey('ClientConnection', cascade='null', default=None)
   classInfos = dict() # brokerId => classInfo
@@ -364,8 +364,9 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
+  idSourceScope = BigIntCol(default=None)
+  idSourceObject = BigIntCol(default=None)
   creationTime = TimestampCol(default=None)
   deletionTime = TimestampCol(default=None)
   managedBroker = StringCol(length=1000, default=None)
@@ -406,7 +407,6 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
   link = ForeignKey('Link', cascade='null', default=None)
   classInfos = dict() # brokerId => classInfo
@@ -420,8 +420,9 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
+  idSourceScope = BigIntCol(default=None)
+  idSourceObject = BigIntCol(default=None)
   creationTime = TimestampCol(default=None)
   deletionTime = TimestampCol(default=None)
   managedBroker = StringCol(length=1000, default=None)
@@ -451,7 +452,6 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
   bridge = ForeignKey('Bridge', cascade='null', default=None)
   classInfos = dict() # brokerId => classInfo
@@ -463,8 +463,9 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
+  idSourceScope = BigIntCol(default=None)
+  idSourceObject = BigIntCol(default=None)
   creationTime = TimestampCol(default=None)
   deletionTime = TimestampCol(default=None)
   managedBroker = StringCol(length=1000, default=None)
@@ -510,7 +511,6 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
   session = ForeignKey('Session', cascade='null', default=None)
   classInfos = dict() # brokerId => classInfo
@@ -525,8 +525,9 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
+  idSourceScope = BigIntCol(default=None)
+  idSourceObject = BigIntCol(default=None)
   creationTime = TimestampCol(default=None)
   deletionTime = TimestampCol(default=None)
   managedBroker = StringCol(length=1000, default=None)
@@ -537,32 +538,15 @@
   location = StringCol(length=1000, default=None)
   defaultInitialFileCount = SmallIntCol(default=None)
   defaultDataFileSize = IntCol(default=None)
-  tplIsInitialized = BoolCol(default=None)
-  tplDirectory = StringCol(length=1000, default=None)
-  tplWritePageSize = IntCol(default=None)
-  tplWritePages = IntCol(default=None)
-  tplInitialFileCount = SmallIntCol(default=None)
-  tplDataFileSize = IntCol(default=None)
-  tplCurrentFileCount = IntCol(default=None)
 
 
 class StoreStats(SQLObject):
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
   store = ForeignKey('Store', cascade='null', default=None)
   classInfos = dict() # brokerId => classInfo
-  tplTransactionDepth = IntCol(default=None)
-  tplTransactionDepthLow = IntCol(default=None)
-  tplTransactionDepthHigh = IntCol(default=None)
-  tplTxnPrepares = BigIntCol(default=None)
-  tplTxnCommits = BigIntCol(default=None)
-  tplTxnAborts = BigIntCol(default=None)
-  tplOutstandingAIOs = IntCol(default=None)
-  tplOutstandingAIOsLow = IntCol(default=None)
-  tplOutstandingAIOsHigh = IntCol(default=None)
 
 
 
@@ -571,25 +555,23 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
+  idSourceScope = BigIntCol(default=None)
+  idSourceObject = BigIntCol(default=None)
   creationTime = TimestampCol(default=None)
   deletionTime = TimestampCol(default=None)
   managedBroker = StringCol(length=1000, default=None)
   statsCurr = ForeignKey('JournalStats', cascade='null', default=None)
   statsPrev = ForeignKey('JournalStats', cascade='null', default=None)
   classInfos = dict() # brokerId => classInfo
-  queue = ForeignKey('Queue', cascade='null', default=None)
   name = StringCol(length=1000, default=None)
+  queue = ForeignKey('Queue', cascade='null', default=None)
   directory = StringCol(length=1000, default=None)
   baseFileName = StringCol(length=1000, default=None)
   writePageSize = IntCol(default=None)
   writePages = IntCol(default=None)
   readPageSize = IntCol(default=None)
   readPages = IntCol(default=None)
-  initialFileCount = SmallIntCol(default=None)
-  dataFileSize = IntCol(default=None)
-  currentFileCount = IntCol(default=None)
 
 
   def expand(self, model, callback, by):
@@ -605,19 +587,17 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
   journal = ForeignKey('Journal', cascade='null', default=None)
   classInfos = dict() # brokerId => classInfo
+  initialFileCount = SmallIntCol(default=None)
+  dataFileSize = IntCol(default=None)
+  currentFileCount = IntCol(default=None)
   recordDepth = IntCol(default=None)
   recordDepthLow = IntCol(default=None)
   recordDepthHigh = IntCol(default=None)
-  enqueues = BigIntCol(default=None)
-  dequeues = BigIntCol(default=None)
-  txnEnqueues = BigIntCol(default=None)
-  txnDequeues = BigIntCol(default=None)
-  txnCommits = BigIntCol(default=None)
-  txnAborts = BigIntCol(default=None)
+  recordEnqueues = BigIntCol(default=None)
+  recordDequeues = BigIntCol(default=None)
   outstandingAIOs = IntCol(default=None)
   outstandingAIOsLow = IntCol(default=None)
   outstandingAIOsHigh = IntCol(default=None)
@@ -645,8 +625,9 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
+  idSourceScope = BigIntCol(default=None)
+  idSourceObject = BigIntCol(default=None)
   creationTime = TimestampCol(default=None)
   deletionTime = TimestampCol(default=None)
   managedBroker = StringCol(length=1000, default=None)
@@ -709,7 +690,6 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
   slot = ForeignKey('Slot', cascade='null', default=None)
   classInfos = dict() # brokerId => classInfo
@@ -760,8 +740,9 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
+  idSourceScope = BigIntCol(default=None)
+  idSourceObject = BigIntCol(default=None)
   creationTime = TimestampCol(default=None)
   deletionTime = TimestampCol(default=None)
   managedBroker = StringCol(length=1000, default=None)
@@ -804,7 +785,6 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
   job = ForeignKey('Job', cascade='null', default=None)
   classInfos = dict() # brokerId => classInfo
@@ -816,8 +796,9 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
+  idSourceScope = BigIntCol(default=None)
+  idSourceObject = BigIntCol(default=None)
   creationTime = TimestampCol(default=None)
   deletionTime = TimestampCol(default=None)
   managedBroker = StringCol(length=1000, default=None)
@@ -840,7 +821,6 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
   scheduler = ForeignKey('Scheduler', cascade='null', default=None)
   classInfos = dict() # brokerId => classInfo
@@ -865,8 +845,9 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
+  idSourceScope = BigIntCol(default=None)
+  idSourceObject = BigIntCol(default=None)
   creationTime = TimestampCol(default=None)
   deletionTime = TimestampCol(default=None)
   managedBroker = StringCol(length=1000, default=None)
@@ -884,7 +865,6 @@
   class sqlmeta:
     lazyUpdate = True
 
-  idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
   submitter = ForeignKey('Submitter', cascade='null', default=None)
   classInfos = dict() # brokerId => classInfo
@@ -915,7 +895,9 @@
 
 ClientConnection.sqlmeta.addJoin(SQLMultipleJoin('Agent', joinMethodName='agents'))
 
+Broker.sqlmeta.addJoin(SQLMultipleJoin('Agent', joinMethodName='agents'))
 
+
 Agent.sqlmeta.addJoin(SQLMultipleJoin('AgentStats', joinMethodName='stats'))
 
 classToSchemaNameMap['Vhost'] = 'Vhost'

Modified: mgmt/trunk/mint/sql/schema.sql
===================================================================
--- mgmt/trunk/mint/sql/schema.sql	2008-09-05 15:44:05 UTC (rev 2418)
+++ mgmt/trunk/mint/sql/schema.sql	2008-09-05 15:45:46 UTC (rev 2419)
@@ -58,8 +58,9 @@
 
 CREATE TABLE agent (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
+    id_source_scope BIGINT,
+    id_source_object BIGINT,
     creation_time TIMESTAMP,
     deletion_time TIMESTAMP,
     managed_broker VARCHAR(1000),
@@ -67,22 +68,22 @@
     stats_prev_id INT,
     client_connection_id INT,
     label VARCHAR(1000),
-    registered_to BIGINT,
+    broker_id INT,
     system_id BYTEA,
     object_id_bank INT
 );
 
 CREATE TABLE agent_stats (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
     agent_id INT
 );
 
 CREATE TABLE binding (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
+    id_source_scope BIGINT,
+    id_source_object BIGINT,
     creation_time TIMESTAMP,
     deletion_time TIMESTAMP,
     managed_broker VARCHAR(1000),
@@ -96,7 +97,6 @@
 
 CREATE TABLE binding_stats (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
     binding_id INT,
     msg_matched BIGINT
@@ -104,8 +104,9 @@
 
 CREATE TABLE bridge (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
+    id_source_scope BIGINT,
+    id_source_object BIGINT,
     creation_time TIMESTAMP,
     deletion_time TIMESTAMP,
     managed_broker VARCHAR(1000),
@@ -125,15 +126,15 @@
 
 CREATE TABLE bridge_stats (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
     bridge_id INT
 );
 
 CREATE TABLE broker (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
+    id_source_scope BIGINT,
+    id_source_object BIGINT,
     creation_time TIMESTAMP,
     deletion_time TIMESTAMP,
     managed_broker VARCHAR(1000),
@@ -154,15 +155,15 @@
 
 CREATE TABLE broker_stats (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
     broker_id INT
 );
 
 CREATE TABLE client_connection (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
+    id_source_scope BIGINT,
+    id_source_object BIGINT,
     creation_time TIMESTAMP,
     deletion_time TIMESTAMP,
     managed_broker VARCHAR(1000),
@@ -175,7 +176,6 @@
 
 CREATE TABLE client_connection_stats (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
     client_connection_id INT,
     closing BOOL,
@@ -188,8 +188,9 @@
 
 CREATE TABLE exchange (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
+    id_source_scope BIGINT,
+    id_source_object BIGINT,
     creation_time TIMESTAMP,
     deletion_time TIMESTAMP,
     managed_broker VARCHAR(1000),
@@ -203,7 +204,6 @@
 
 CREATE TABLE exchange_stats (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
     exchange_id INT,
     producer_count INT,
@@ -222,8 +222,9 @@
 
 CREATE TABLE job (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
+    id_source_scope BIGINT,
+    id_source_object BIGINT,
     creation_time TIMESTAMP,
     deletion_time TIMESTAMP,
     managed_broker VARCHAR(1000),
@@ -255,47 +256,42 @@
 
 CREATE TABLE job_stats (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
     job_id INT
 );
 
 CREATE TABLE journal (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
+    id_source_scope BIGINT,
+    id_source_object BIGINT,
     creation_time TIMESTAMP,
     deletion_time TIMESTAMP,
     managed_broker VARCHAR(1000),
     stats_curr_id INT,
     stats_prev_id INT,
-    queue_id INT,
     name VARCHAR(1000),
+    queue_id INT,
     directory VARCHAR(1000),
     base_file_name VARCHAR(1000),
     write_page_size INT,
     write_pages INT,
     read_page_size INT,
-    read_pages INT,
-    initial_file_count SMALLINT,
-    data_file_size INT,
-    current_file_count INT
+    read_pages INT
 );
 
 CREATE TABLE journal_stats (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
     journal_id INT,
+    initial_file_count SMALLINT,
+    data_file_size INT,
+    current_file_count INT,
     record_depth INT,
     record_depth_low INT,
     record_depth_high INT,
-    enqueues BIGINT,
-    dequeues BIGINT,
-    txn_enqueues BIGINT,
-    txn_dequeues BIGINT,
-    txn_commits BIGINT,
-    txn_aborts BIGINT,
+    record_enqueues BIGINT,
+    record_dequeues BIGINT,
     outstanding_ai_os INT,
     outstanding_ai_os_low INT,
     outstanding_ai_os_high INT,
@@ -319,8 +315,9 @@
 
 CREATE TABLE link (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
+    id_source_scope BIGINT,
+    id_source_object BIGINT,
     creation_time TIMESTAMP,
     deletion_time TIMESTAMP,
     managed_broker VARCHAR(1000),
@@ -335,7 +332,6 @@
 
 CREATE TABLE link_stats (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
     link_id INT,
     state VARCHAR(1000),
@@ -344,8 +340,9 @@
 
 CREATE TABLE queue (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
+    id_source_scope BIGINT,
+    id_source_object BIGINT,
     creation_time TIMESTAMP,
     deletion_time TIMESTAMP,
     managed_broker VARCHAR(1000),
@@ -361,7 +358,6 @@
 
 CREATE TABLE queue_stats (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
     queue_id INT,
     msg_total_enqueues BIGINT,
@@ -403,8 +399,9 @@
 
 CREATE TABLE scheduler (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
+    id_source_scope BIGINT,
+    id_source_object BIGINT,
     creation_time TIMESTAMP,
     deletion_time TIMESTAMP,
     managed_broker VARCHAR(1000),
@@ -423,7 +420,6 @@
 
 CREATE TABLE scheduler_stats (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
     scheduler_id INT,
     num_users INT,
@@ -442,8 +438,9 @@
 
 CREATE TABLE session (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
+    id_source_scope BIGINT,
+    id_source_object BIGINT,
     creation_time TIMESTAMP,
     deletion_time TIMESTAMP,
     managed_broker VARCHAR(1000),
@@ -458,7 +455,6 @@
 
 CREATE TABLE session_stats (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
     session_id INT,
     attached BOOL,
@@ -468,8 +464,9 @@
 
 CREATE TABLE slot (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
+    id_source_scope BIGINT,
+    id_source_object BIGINT,
     creation_time TIMESTAMP,
     deletion_time TIMESTAMP,
     managed_broker VARCHAR(1000),
@@ -528,7 +525,6 @@
 
 CREATE TABLE slot_stats (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
     slot_id INT,
     activity VARCHAR(1000),
@@ -573,8 +569,9 @@
 
 CREATE TABLE store (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
+    id_source_scope BIGINT,
+    id_source_object BIGINT,
     creation_time TIMESTAMP,
     deletion_time TIMESTAMP,
     managed_broker VARCHAR(1000),
@@ -583,36 +580,20 @@
     broker_id INT,
     location VARCHAR(1000),
     default_initial_file_count SMALLINT,
-    default_data_file_size INT,
-    tpl_is_initialized BOOL,
-    tpl_directory VARCHAR(1000),
-    tpl_write_page_size INT,
-    tpl_write_pages INT,
-    tpl_initial_file_count SMALLINT,
-    tpl_data_file_size INT,
-    tpl_current_file_count INT
+    default_data_file_size INT
 );
 
 CREATE TABLE store_stats (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
-    store_id INT,
-    tpl_transaction_depth INT,
-    tpl_transaction_depth_low INT,
-    tpl_transaction_depth_high INT,
-    tpl_txn_prepares BIGINT,
-    tpl_txn_commits BIGINT,
-    tpl_txn_aborts BIGINT,
-    tpl_outstanding_ai_os INT,
-    tpl_outstanding_ai_os_low INT,
-    tpl_outstanding_ai_os_high INT
+    store_id INT
 );
 
 CREATE TABLE submitter (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
+    id_source_scope BIGINT,
+    id_source_object BIGINT,
     creation_time TIMESTAMP,
     deletion_time TIMESTAMP,
     managed_broker VARCHAR(1000),
@@ -627,7 +608,6 @@
 
 CREATE TABLE submitter_stats (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
     submitter_id INT,
     held_jobs INT,
@@ -637,8 +617,9 @@
 
 CREATE TABLE system (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
+    id_source_scope BIGINT,
+    id_source_object BIGINT,
     creation_time TIMESTAMP,
     deletion_time TIMESTAMP,
     managed_broker VARCHAR(1000),
@@ -654,15 +635,15 @@
 
 CREATE TABLE system_stats (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
     system_id INT
 );
 
 CREATE TABLE vhost (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
+    id_source_scope BIGINT,
+    id_source_object BIGINT,
     creation_time TIMESTAMP,
     deletion_time TIMESTAMP,
     managed_broker VARCHAR(1000),
@@ -674,7 +655,6 @@
 
 CREATE TABLE vhost_stats (
     id SERIAL PRIMARY KEY,
-    id_original BIGINT,
     rec_time TIMESTAMP,
     vhost_id INT
 );
@@ -695,6 +675,8 @@
 
 ALTER TABLE agent ADD CONSTRAINT client_connection_id_exists FOREIGN KEY (client_connection_id) REFERENCES client_connection (id) ON DELETE SET NULL;
 
+ALTER TABLE agent ADD CONSTRAINT broker_id_exists FOREIGN KEY (broker_id) REFERENCES broker (id) ON DELETE SET NULL;
+
 ALTER TABLE agent_stats ADD CONSTRAINT agent_id_exists FOREIGN KEY (agent_id) REFERENCES agent (id) ON DELETE SET NULL;
 
 ALTER TABLE binding ADD CONSTRAINT stats_curr_id_exists FOREIGN KEY (stats_curr_id) REFERENCES binding_stats (id) ON DELETE SET NULL;




More information about the rhmessaging-commits mailing list