MantisBT - CDash
View Issue Details
0010426CDashpublic2010-03-17 02:202010-04-16 13:38
Stanislaw Szymczyk 
Julien Jomier 
normalmajoralways
closedfixed 
 
1.6.4 
0010426: ClientJobSchedule::Save fails because of missing client_jobschedule table columns
While trying to get the new integrated build management feature working in CDash 1.6.2 I noticed that scheduling a build always ends whith the following error message:

[2010-03-17T07:01:05][ERROR](ClientJobSchedule::Save): SQL error: Unknown column 'repository' in 'field list'

After inspecting models/clientjobschedule.php and cdash database I noticed that several columns used in ClientJobSchedule::Save method are missing in client_jobschedule database table: repository, module, buildnamesuffix, tag.

The missing columns are only added by backwardCompatibilityTools.php when upgrading a database schema to 1.6, they are not present in sql/mysql/cdash.sql nor sql/pgsql/cdash.sql, so freshly created database doesn't contain them.
No tags attached.
Issue History
2010-03-17 02:20Stanislaw SzymczykNew Issue
2010-03-21 10:23Julien JomierStatusnew => assigned
2010-03-21 10:23Julien JomierAssigned To => Julien Jomier
2010-03-21 10:46Julien JomierNote Added: 0019974
2010-03-21 10:46Julien JomierStatusassigned => resolved
2010-03-21 10:46Julien JomierFixed in Version => 1.8
2010-03-21 10:46Julien JomierResolutionopen => fixed
2010-04-16 13:38Julien JomierStatusresolved => closed
2010-04-16 13:38Julien JomierFixed in Version1.8 => 1.6.4

Notes
(0019974)
Julien Jomier   
2010-03-21 10:46   
Good catch. Here's the complete table. I'm going to add an upgrade for CDash 1.8. Regretfully CDash 1.6 would have to be reinstalled from scratch for this to work.

CREATE TABLE IF NOT EXISTS client_jobschedule (
  `id` bigint(20) unsigned NOT NULL auto_increment,
  `userid` int(11) default NULL,
  `projectid` int(11) default NULL,
  `cmakecache` mediumtext NOT NULL,
  `startdate` timestamp NOT NULL default '1980-01-01 00:00:00',
  `enddate` timestamp NOT NULL default '1980-01-01 00:00:00',
  `type` tinyint(4) NOT NULL,
  `starttime` time NOT NULL default '00:00:00',
  `repeattime` decimal(3,2) NOT NULL default '0.00',
  `enable` tinyint(4) NOT NULL,
  `lastrun` timestamp NOT NULL default '1980-01-01 00:00:00',
  `repository` varchar(512) default '',
  `module` varchar(255) default '',
  `buildnamesuffix` varchar(255) default '',
  `tag` varchar(255) default '',
  UNIQUE KEY `id` (`id`),
  KEY `userid` (`userid`),
  KEY `projectid` (`projectid`),
  KEY `enable` (`enable`),
  KEY `starttime` (`starttime`),
  KEY `repeattime` (`repeattime`)
);