Author: justi9
Date: 2008-08-29 10:36:01 -0400 (Fri, 29 Aug 2008)
New Revision: 2367
Modified:
mgmt/trunk/mint/python/mint/schema.py
mgmt/trunk/mint/sql/schema.sql
Log:
Update to the latest condor schema
Modified: mgmt/trunk/mint/python/mint/schema.py
===================================================================
--- mgmt/trunk/mint/python/mint/schema.py 2008-08-29 14:35:41 UTC (rev 2366)
+++ mgmt/trunk/mint/python/mint/schema.py 2008-08-29 14:36:01 UTC (rev 2367)
@@ -756,6 +756,7 @@
managedBroker = StringCol(length=1000, default=None)
statsCurr = ForeignKey('JobStats', cascade='null', default=None)
statsPrev = ForeignKey('JobStats', cascade='null', default=None)
+ scheduler = ForeignKey('Scheduler', cascade='null', default=None)
AccountingGroup = StringCol(length=1000, default=None)
Args = StringCol(length=4000, default=None)
ClusterId = IntCol(default=None)
@@ -849,6 +850,7 @@
managedBroker = StringCol(length=1000, default=None)
statsCurr = ForeignKey('SubmitterStats', cascade='null', default=None)
statsPrev = ForeignKey('SubmitterStats', cascade='null', default=None)
+ scheduler = ForeignKey('Scheduler', cascade='null', default=None)
JobQueueBirthdate = IntCol(default=None)
Machine = StringCol(length=1000, default=None)
Name = StringCol(length=1000, default=None)
@@ -986,15 +988,21 @@
classToSchemaNameMap['Job'] = 'Job'
schemaNameToClassMap['Job'] = Job
+Scheduler.sqlmeta.addJoin(SQLMultipleJoin('Job', joinMethodName='jobs'))
+
+
Job.sqlmeta.addJoin(SQLMultipleJoin('JobStats', joinMethodName='stats'))
-classToSchemaNameMap['Scheduler'] = 'scheduler'
-schemaNameToClassMap['scheduler'] = Scheduler
+classToSchemaNameMap['Scheduler'] = 'Scheduler'
+schemaNameToClassMap['Scheduler'] = Scheduler
Scheduler.sqlmeta.addJoin(SQLMultipleJoin('SchedulerStats',
joinMethodName='stats'))
-classToSchemaNameMap['Submitter'] = 'submitter'
-schemaNameToClassMap['submitter'] = Submitter
+classToSchemaNameMap['Submitter'] = 'Submitter'
+schemaNameToClassMap['Submitter'] = Submitter
+Scheduler.sqlmeta.addJoin(SQLMultipleJoin('Submitter',
joinMethodName='submitters'))
+
+
Submitter.sqlmeta.addJoin(SQLMultipleJoin('SubmitterStats',
joinMethodName='stats'))
Modified: mgmt/trunk/mint/sql/schema.sql
===================================================================
--- mgmt/trunk/mint/sql/schema.sql 2008-08-29 14:35:41 UTC (rev 2366)
+++ mgmt/trunk/mint/sql/schema.sql 2008-08-29 14:36:01 UTC (rev 2367)
@@ -229,6 +229,7 @@
managed_broker VARCHAR(1000),
stats_curr_id INT,
stats_prev_id INT,
+ scheduler_id INT,
accounting_group VARCHAR(1000),
args VARCHAR(4000),
cluster_id INT,
@@ -599,6 +600,7 @@
managed_broker VARCHAR(1000),
stats_curr_id INT,
stats_prev_id INT,
+ scheduler_id INT,
job_queue_birthdate INT,
machine VARCHAR(1000),
name VARCHAR(1000),
@@ -725,6 +727,8 @@
ALTER TABLE job ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id)
REFERENCES job_stats (id) ON DELETE SET NULL;
+ALTER TABLE job ADD CONSTRAINT scheduler_id_exists FOREIGN KEY (scheduler_id) REFERENCES
scheduler (id) ON DELETE SET NULL;
+
ALTER TABLE job_stats ADD CONSTRAINT job_id_exists FOREIGN KEY (job_id) REFERENCES job
(id) ON DELETE SET NULL;
ALTER TABLE journal ADD CONSTRAINT stats_curr_id_exists FOREIGN KEY (stats_curr_id)
REFERENCES journal_stats (id) ON DELETE SET NULL;
@@ -785,6 +789,8 @@
ALTER TABLE submitter ADD CONSTRAINT stats_prev_id_exists FOREIGN KEY (stats_prev_id)
REFERENCES submitter_stats (id) ON DELETE SET NULL;
+ALTER TABLE submitter ADD CONSTRAINT scheduler_id_exists FOREIGN KEY (scheduler_id)
REFERENCES scheduler (id) ON DELETE SET NULL;
+
ALTER TABLE submitter_stats ADD CONSTRAINT submitter_id_exists FOREIGN KEY (submitter_id)
REFERENCES submitter (id) ON DELETE SET NULL;
ALTER TABLE system ADD CONSTRAINT stats_curr_id_exists FOREIGN KEY (stats_curr_id)
REFERENCES system_stats (id) ON DELETE SET NULL;