fogproject  1.5.9
About: FOG is a Linux-based network computer cloning solution for Windows, Mac OSX and various Linux distributions that ties together a few open-source tools with a PHP-based web interface. FOG doesn’t use any boot disks, or CDs; everything is done via TFTP and PXE.
  Fossies Dox: fogproject-1.5.9.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

schema.php
Go to the documentation of this file.
1 <?php
22 $tmpSchema = self::getClass('Schema');
23 self::$DB->query(Schema::useDatabaseQuery());
24 // 0
25 $this->schema[] = array(
28  'CREATE TABLE `groupMembers` ('
29  . '`gmID` INT(11) NOT NULL AUTO_INCREMENT,'
30  . '`gmHostID` INT(11) NOT NULL,'
31  . '`gmGroupID` INT(11) NOT NULL,'
32  . 'PRIMARY KEY (`gmID`),'
33  . 'UNIQUE KEY `gmHostID` (`gmHostID`,`gmGroupID`),'
34  . 'UNIQUE KEY `gmGroupID` (`gmHostID`,`gmGroupID`),'
35  . 'KEY `new_index` (`gmHostID`),'
36  . 'KEY `new_index1` (`gmGroupID`)'
37  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
38  'CREATE TABLE `groups` ('
39  . '`groupID` INT(11) NOT NULL auto_increment,'
40  . '`groupName` VARCHAR(50) NOT NULL,'
41  . '`groupDesc` LONGTEXT NOT NULL,'
42  . '`groupDateTime` DATETIME NOT NULL,'
43  . '`groupCreateBy` VARCHAR(50) NOT NULL,'
44  . '`groupBuilding` INT(11) NOT NULL,'
45  . 'PRIMARY KEY (`groupID`),'
46  . 'KEY `new_index` (`groupName`)'
47  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
48  'CREATE TABLE `history` ('
49  . '`hID` INT(11) NOT NULL AUTO_INCREMENT,'
50  . '`hText` LONGTEXT NOT NULL,'
51  . '`hUser` VARCHAR(200) NOT NULL,'
52  . '`hTime` DATETIME NOT NULL,'
53  . '`hIP` VARCHAR(50) NOT NULL,'
54  . 'PRIMARY KEY (`hID`)'
55  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
56  'CREATE TABLE `hosts` ('
57  . '`hostID` int(11) NOT NULL auto_increment,'
58  . '`hostName` varchar(16) NOT NULL,'
59  . '`hostDesc` longtext NOT NULL,'
60  . '`hostIP` varchar(25) NOT NULL,'
61  . '`hostImage` int(11) NOT NULL,'
62  . '`hostBuilding` int(11) NOT NULL,'
63  . '`hostCreateDate` datetime NOT NULL,'
64  . '`hostCreateBy` varchar(50) NOT NULL,'
65  . '`hostMAC` varchar(20) NOT NULL,'
66  . '`hostOS` int(10) unsigned NOT NULL,'
67  . 'PRIMARY KEY (`hostID`),'
68  . 'KEY `new_index` (`hostName`),'
69  . 'KEY `new_index1` (`hostIP`),'
70  . 'KEY `new_index2` (`hostMAC`),'
71  . 'KEY `new_index3` (`hostOS`)'
72  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
73  'CREATE TABLE `images` ('
74  . '`imageID` INT(11) NOT NULL AUTO_INCREMENT,'
75  . '`imageName` VARCHAR(40) NOT NULL,'
76  . '`imageDesc` LONGTEXT NOT NULL,'
77  . '`imagePath` LONGTEXT NOT NULL,'
78  . '`imageDateTime` DATETIME NOT NULL,'
79  . '`imageCreateBy` VARCHAR(50) NOT NULL,'
80  . '`imageBuilding` int(11) NOT NULL,'
81  . '`imageSize` VARCHAR(200) NOT NULL,'
82  . 'PRIMARY KEY (`imageID`),'
83  . 'KEY `new_index` (`imageName`),'
84  . 'KEY `new_index1` (`imageBuilding`)'
85  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
86  'CREATE TABLE `schemaVersion` ('
87  . '`vID` INT(11) NOT NULL AUTO_INCREMENT,'
88  . '`vValue` INT(11) NOT NULL,'
89  . 'PRIMARY KEY (`vID`)'
90  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
91  'CREATE TABLE `supportedOS` ('
92  . '`osID` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,'
93  . '`osName` VARCHAR(150) NOT NULL,'
94  . '`osValue` int(10) unsigned NOT NULL,'
95  . 'PRIMARY KEY (`osID`),'
96  . 'KEY `new_index` (`osValue`)'
97  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
98  'CREATE TABLE `tasks` ('
99  . '`taskID` INT(11) NOT NULL AUTO_INCREMENT,'
100  . '`taskName` VARCHAR(250) NOT NULL,'
101  . '`taskCreateTime` DATETIME NOT NULL,'
102  . '`taskCheckIn` DATETIME NOT NULL,'
103  . '`taskHostID` INT(11) NOT NULL,'
104  . '`taskState` INT(11) NOT NULL,'
105  . '`taskCreateBy` VARCHAR(200) NOT NULL,'
106  . '`taskForce` VARCHAR(1) NOT NULL,'
107  . '`taskScheduledStartTime` DATETIME NOT NULL,'
108  . '`taskType` VARCHAR(1) NOT NULL,'
109  . '`taskPCT` INT(10) UNSIGNED zerofill NOT NULL,'
110  . 'PRIMARY KEY (`taskID`),'
111  . 'KEY `new_index` (`taskHostID`),'
112  . 'KEY `new_index1` (`taskCheckIn`),'
113  . 'KEY `new_index2` (`taskState`),'
114  . 'KEY `new_index3` (`taskForce`),'
115  . 'KEY `new_index4` (`taskType`)'
116  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
117  'CREATE TABLE `users` ('
118  . '`uId` INT(11) NOT NULL AUTO_INCREMENT,'
119  . '`uName` VARCHAR(40) NOT NULL,'
120  . '`uPass` VARCHAR(50) NOT NULL,'
121  . '`uCreateDate` DATETIME NOT NULL,'
122  . '`uCreateBy` VARCHAR(40) NOT NULL,'
123  . 'PRIMARY KEY (`uId`),'
124  . 'KEY `new_index` (`uName`),'
125  . 'KEY `new_index1` (`uPass`)'
126  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
127  "INSERT IGNORE INTO `users` VALUES ('','fog', MD5('password'), NOW(), '')",
128  "INSERT IGNORE INTO `supportedOS` VALUES ('', 'Windows XP', '1')",
129  "INSERT IGNORE INTO `schemaVersion` VALUES ('', '1')"
130 );
131 // 2
132 $this->schema[] = array(
133  "INSERT IGNORE INTO `supportedOS` VALUES ('', 'Windows Vista', '2')",
134  "UPDATE `schemaVersion` SET vValue='2'",
135 );
136 // 3
137 $this->schema[] = array(
138  'ALTER TABLE `hosts`'
139  . 'ADD COLUMN `hostUseAD` CHAR NOT NULL AFTER `hostOS`,'
140  . 'ADD COLUMN `hostADDomain` VARCHAR(250) NOT NULL AFTER `hostUseAD`,'
141  . 'ADD COLUMN `hostADOU` LONGTEXT NOT NULL AFTER `hostADDomain`,'
142  . 'ADD COLUMN `hostADUser` VARCHAR(250) NOT NULL AFTER `hostADOU`,'
143  . 'ADD COLUMN `hostADPass` VARCHAR(250) NOT NULL AFTER `hostADUser`,'
144  . 'ADD COLUMN `hostAnon1` VARCHAR(250) NOT NULL AFTER `hostADPass`,'
145  . 'ADD COLUMN `hostAnon2` VARCHAR(250) NOT NULL AFTER `hostAnon1`,'
146  . 'ADD COLUMN `hostAnon3` VARCHAR(250) NOT NULL AFTER `hostAnon2`,'
147  . 'ADD COLUMN `hostAnon4` VARCHAR(250) NOT NULL AFTER `hostAnon3`,'
148  . 'ADD INDEX `new_index4` (`hostUseAD`)',
149  'CREATE TABLE `snapinAssoc` ('
150  . '`saID` INT(11) NOT NULL AUTO_INCREMENT,'
151  . '`saHostID` INT(11) NOT NULL,'
152  . '`saSnapinID` INT(11) NOT NULL,'
153  . 'PRIMARY KEY (`saID`),'
154  . 'KEY `new_index` (`saHostID`),'
155  . 'KEY `new_index1` (`saSnapinID`)'
156  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
157  'CREATE TABLE `snapinJobs` ('
158  . '`sjID` INT(11) NOT NULL AUTO_INCREMENT,'
159  . '`sjHostID` INT(11) NOT NULL,'
160  . '`sjCreateTime` DATETIME NOT NULL,'
161  . 'PRIMARY KEY (`sjID`),'
162  . 'KEY `new_index` (`sjHostID`)'
163  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
164  'CREATE TABLE `snapinTasks` ('
165  . '`stID` INT(11) NOT NULL AUTO_INCREMENT,'
166  . '`stJobID` INT(11) NOT NULL,'
167  . '`stState` INT(11) NOT NULL,'
168  . '`stCheckinDate` DATETIME NOT NULL,'
169  . '`stCompleteDate` DATETIME NOT NULL,'
170  . '`stSnapinID` INT(11) NOT NULL,'
171  . 'PRIMARY KEY (`stID`),'
172  . 'KEY `new_index` (`stJobID`),'
173  . 'KEY `new_index1` (`stState`),'
174  . 'KEY `new_index2` (`stSnapinID`)'
175  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
176  'CREATE TABLE `snapins` ('
177  . '`sID` INT(11) NOT NULL AUTO_INCREMENT,'
178  . '`sName` VARCHAR(200) NOT NULL,'
179  . '`sDesc` LONGTEXT NOT NULL,'
180  . '`sFilePath` LONGTEXT NOT NULL,'
181  . '`sArgs` LONGTEXT NOT NULL,'
182  . '`sCreateDate` DATETIME NOT NULL,'
183  . '`sCreator` VARCHAR(200) NOT NULL,'
184  . '`sReboot` VARCHAR(1) NOT NULL,'
185  . '`sAnon1` VARCHAR(45) NOT NULL,'
186  . '`sAnon2` VARCHAR(45) NOT NULL,'
187  . '`sAnon3` VARCHAR(45) NOT NULL,'
188  . 'PRIMARY KEY (`sID`),'
189  . 'KEY `new_index` (`sName`)'
190  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
191  "UPDATE `schemaVersion` SET vValue='3'",
192 );
193 // 4
194 $this->schema[] = array(
195  'CREATE TABLE `multicastSessions` ('
196  . '`msID` INT(11) NOT NULL AUTO_INCREMENT,'
197  . '`msName` VARCHAR(250) NOT NULL,'
198  . '`msBasePort` INT(11) NOT NULL,'
199  . '`msLogPath` LONGTEXT NOT NULL,'
200  . '`msImage` LONGTEXT NOT NULL,'
201  . '`msClients` INT(11) NOT NULL,'
202  . '`msInterface` VARCHAR(250) NOT NULL,'
203  . '`msStartDateTime` DATETIME NOT NULL,'
204  . '`msPercent` INT(11) NOT NULL,'
205  . '`msState` INT(11) NOT NULL,'
206  . '`msCompleteDateTime` DATETIME NOT NULL,'
207  . '`msAnon1` VARCHAR(250) NOT NULL,'
208  . '`msAnon2` VARCHAR(250) NOT NULL,'
209  . '`msAnon3` VARCHAR(250) NOT NULL,'
210  . '`msAnon4` VARCHAR(250) NOT NULL,'
211  . '`msAnon5` VARCHAR(250) NOT NULL,'
212  . 'PRIMARY KEY (`msID`)'
213  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
214  'CREATE TABLE `multicastSessionsAssoc` ('
215  . '`msaID` INT(11) NOT NULL AUTO_INCREMENT,'
216  . '`msID` INT(11) NOT NULL,'
217  . '`tID` INT(11) NOT NULL,'
218  . 'PRIMARY KEY (`msaID`),'
219  . 'KEY `new_index` (`msID`),'
220  . 'KEY `new_index1` (`tID`)'
221  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
222  "UPDATE `schemaVersion` set vValue='4'",
223 );
224 // 5
225 $this->schema[] = array(
226  'ALTER TABLE `images`'
227  . 'ADD COLUMN `imageDD` VARCHAR(1) NOT NULL AFTER `imageSize`,'
228  . 'ADD INDEX `new_index2` (`imageDD`)',
229  "UPDATE `supportedOS` SET `osName`='Windows 2000/XP' WHERE `osValue`='1'",
230  "INSERT IGNORE INTO `supportedOS` VALUES ('', 'Other', '99')",
231  'ALTER TABLE `multicastSessions`'
232  . 'CHANGE `msAnon1` `msIsDD` VARCHAR(1) NOT NULL',
233  "UPDATE `schemaVersion` SET vValue='5'",
234 );
235 // 7
236 $this->schema[] = array(
237  'CREATE TABLE `virus` ('
238  . '`vID` INTEGER NOT NULL AUTO_INCREMENT,'
239  . '`vName` VARCHAR(250) NOT NULL,'
240  . '`vHostMAC` VARCHAR(50) NOT NULL,'
241  . '`vOrigFile` LONGTEXT NOT NULL,'
242  . '`vDateTime` DATETIME NOT NULL,'
243  . '`vMode` VARCHAR(5) NOT NULL,'
244  . '`vAnon2` VARCHAR(50) NOT NULL,'
245  . 'PRIMARY KEY (`vID`),'
246  . 'INDEX `new_index` (`vHostMAC`),'
247  . 'INDEX `new_index2`(`vDateTime`)'
248  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
249  "UPDATE `schemaVersion` SET `vValue`='6'",
250 );
251 // 8
252 $this->schema[] = array(
253  'CREATE TABLE `userTracking` ('
254  . '`utID` INTEGER NOT NULL AUTO_INCREMENT,'
255  . '`utHostID` INTEGER NOT NULL,'
256  . '`utUserName` VARCHAR(50) NOT NULL,'
257  . '`utAction` VARCHAR(2) NOT NULL,'
258  . '`utDateTime` DATETIME NOT NULL,'
259  . '`utDesc` VARCHAR(250) NOT NULL,'
260  . '`utDate` DATE NOT NULL,'
261  . '`utAnon3` VARCHAR(2) NOT NULL,'
262  . 'PRIMARY KEY (`utID`),'
263  . 'INDEX `new_index` (`utHostID`),'
264  . 'INDEX `new_index1` (`utUserName`),'
265  . 'INDEX `new_index2` (`utAction`),'
266  . 'INDEX `new_index3` (`utDateTime`)'
267  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
268  'ALTER TABLE `hosts`'
269  . 'CHANGE `hostAnon1` `hostPrinterLevel` VARCHAR(2)'
270  . 'CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL',
271  'CREATE TABLE `printers` ('
272  . '`pID` INTEGER NOT NULL AUTO_INCREMENT,'
273  . '`pPort` LONGTEXT NOT NULL,'
274  . '`pDefFile` LONGTEXT NOT NULL,'
275  . '`pModel` VARCHAR(250) NOT NULL,'
276  . '`pAlias` VARCHAR(250) NOT NULL,'
277  . '`pConfig` VARCHAR(10) NOT NULL,'
278  . '`pIP` VARCHAR(20) NOT NULL,'
279  . '`pAnon2` VARCHAR(10) NOT NULL,'
280  . '`pAnon3` VARCHAR(10) NOT NULL,'
281  . '`pAnon4` VARCHAR(10) NOT NULL,'
282  . '`pAnon5` VARCHAR(10) NOT NULL,'
283  . 'PRIMARY KEY (`pID`),'
284  . 'INDEX `new_index1`(`pModel`),'
285  . 'INDEX `new_index2`(`pAlias`)'
286  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
287  'CREATE TABLE `printerAssoc` ('
288  . '`paID` INTEGER NOT NULL AUTO_INCREMENT,'
289  . '`paHostID` INTEGER NOT NULL,'
290  . '`paPrinterID` INTEGER NOT NULL,'
291  . '`paIsDefault` VARCHAR(2) NOT NULL,'
292  . '`paAnon1` VARCHAR(2) NOT NULL,'
293  . '`paAnon2` VARCHAR(2) NOT NULL,'
294  . '`paAnon3` VARCHAR(2) NOT NULL,'
295  . '`paAnon4` VARCHAR(2) NOT NULL,'
296  . '`paAnon5` VARCHAR(2) NOT NULL,'
297  . 'PRIMARY KEY (`paID`),'
298  . 'INDEX `new_index1` (`paHostID`),'
299  . 'INDEX `new_index2` (`paPrinterID`)'
300  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
301  'CREATE TABLE `inventory` ('
302  . '`iID` INT(11) NOT NULL AUTO_INCREMENT,'
303  . '`iHostID` INT(11) NOT NULL,'
304  . '`iPrimaryUser` VARCHAR(50) NOT NULL,'
305  . '`iOtherTag` VARCHAR(50) NOT NULL,'
306  . '`iOtherTag1` VARCHAR(50) NOT NULL,'
307  . '`iCreateDate` DATETIME NOT NULL,'
308  . '`iSysman` VARCHAR(250) NOT NULL,'
309  . '`iSysproduct` VARCHAR(250) NOT NULL,'
310  . '`iSysversion` VARCHAR(250) NOT NULL,'
311  . '`iSysserial` VARCHAR(250) NOT NULL,'
312  . '`iSystype` VARCHAR(250) NOT NULL,'
313  . '`iBiosversion` VARCHAR(250) NOT NULL,'
314  . '`iBiosvendor` VARCHAR(250) NOT NULL,'
315  . '`iBiosdate` VARCHAR(250) NOT NULL,'
316  . '`iMbman` VARCHAR(250) NOT NULL,'
317  . '`iMbproductname` VARCHAR(250) NOT NULL,'
318  . '`iMbversion` VARCHAR(250) NOT NULL,'
319  . '`iMbserial` VARCHAR(250) NOT NULL,'
320  . '`iMbasset` VARCHAR(250) NOT NULL,'
321  . '`iCpuman` VARCHAR(250) NOT NULL,'
322  . '`iCpuversion` VARCHAR(250) NOT NULL,'
323  . '`iCpucurrent` VARCHAR(250) NOT NULL,'
324  . '`iCpumax` VARCHAR(250) NOT NULL,'
325  . '`iMem` VARCHAR(250) NOT NULL,'
326  . '`iHdmodel` VARCHAR(250) NOT NULL,'
327  . '`iHdfirmware` VARCHAR(250) NOT NULL,'
328  . '`iHdserial` VARCHAR(250) NOT NULL,'
329  . '`iCaseman` VARCHAR(250) NOT NULL,'
330  . '`iCasever` VARCHAR(250) NOT NULL,'
331  . '`iCaseserial` VARCHAR(250) NOT NULL,'
332  . '`iCaseasset` VARCHAR(250) NOT NULL,'
333  . 'PRIMARY KEY (`iID`)'
334  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
335  'CREATE TABLE `clientUpdates` ('
336  . '`cuID` INTEGER NOT NULL AUTO_INCREMENT,'
337  . '`cuName` VARCHAR(200) NOT NULL,'
338  . '`cuMD5` VARCHAR(100) NOT NULL,'
339  . '`cuType` VARCHAR(3) NOT NULL,'
340  . '`cuFile` LONGBLOB NOT NULL,'
341  . 'PRIMARY KEY (`cuID`),'
342  . 'INDEX `new_index` (`cuName`),'
343  . 'INDEX `new_index1`(`cuType`)'
344  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
345  "UPDATE `schemaVersion` SET vValue='7'",
346 );
347 // 8
348 $this->schema[] = array(
349  "INSERT IGNORE INTO `supportedOS` (`osName`, `osValue`) VALUES "
350  . "('Windows 98','3'),"
351  . "('Windows (other)','4'),"
352  . "('Linux','50')",
353  "ALTER TABLE `multicastSessions` MODIFY COLUMN `msIsDD` INTEGER NOT NULL",
354  "UPDATE `schemaVersion` SET vValue='8'",
355 );
356 // 9
357 $this->schema[] = array(
358  'CREATE TABLE `globalSettings` ('
359  . '`settingID` INTEGER NOT NULL AUTO_INCREMENT,'
360  . '`settingKey` VARCHAR(254) NOT NULL,'
361  . '`settingDesc` LONGTEXT NOT NULL,'
362  . '`settingValue` VARCHAR(254) NOT NULL,'
363  . '`settingCategory` VARCHAR(254) NOT NULL,'
364  . 'PRIMARY KEY (`settingID`),'
365  . 'INDEX `new_index` (`settingKey`)'
366  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
367  'INSERT IGNORE INTO `globalSettings`'
368  . '(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`)'
369  . 'VALUES'
370  . "('FOG_TFTP_HOST','Hostname or IP address of the TFTP Server.','"
371  . TFTP_HOST
372  . "','TFTP Server'),"
373  . "('FOG_TFTP_FTP_USERNAME','Username used to access the tftp server via ftp.','"
374  . TFTP_FTP_USERNAME
375  . "','TFTP Server'),"
376  . "('FOG_TFTP_FTP_PASSWORD','Password used to access the tftp server via ftp.','"
377  . TFTP_FTP_PASSWORD
378  . "','TFTP Server'),"
379  . "('FOG_TFTP_PXE_KERNEL_DIR','Location of kernel files on the PXE server.','"
380  . TFTP_PXE_KERNEL_DIR
381  . "','TFTP Server'),"
382  . "('FOG_TFTP_PXE_KERNEL','Location of kernel file on the PXE server,"
383  . "this should point to the kernel itself.','"
384  . PXE_KERNEL
385  . "','TFTP Server'),"
386  . "('FOG_KERNEL_RAMDISK_SIZE','This setting defines the amount of physical "
387  . "memory (in KB) you want to use for the boot image. This setting needs "
388  . "to be larger than the boot image and smaller that the total physical "
389  . "memory on the client.','"
390  . PXE_KERNEL_RAMDISK
391  . "','TFTP Server'),"
392  . "('FOG_USE_SLOPPY_NAME_LOOKUPS','The settings was added to workaround "
393  . "a partial implementation of DHCP in the boot image. The boot image "
394  . "is unable to obtain a DNS server address from the DHCP server, "
395  . "so what this setting will do is resolve any hostnames to IP "
396  . "address on the FOG server before writing the config files.','"
397  . USE_SLOPPY_NAME_LOOKUPS
398  . "','General Settings'),"
399  . "('FOG_MEMTEST_KERNEL', 'The settings defines where the memtest boot "
400  . "image/kernel is located.','"
401  . MEMTEST_KERNEL
402  . "','General Settings'),"
403  . "('FOG_PXE_BOOT_IMAGE','The settings defines where the fog boot file "
404  . "system image is located.','"
405  . PXE_IMAGE
406  . "','TFTP Server'),"
407  . "('FOG_NFS_HOST','This setting defines the hostname or ip address "
408  . "of the NFS server used with FOG.','"
409  . STORAGE_HOST
410  . "','NFS Server'),"
411  . "('FOG_NFS_FTP_USERNAME','This setting defines the username "
412  . "used to access files on the nfs server used with FOG.','"
413  . STORAGE_FTP_USERNAME
414  . "','NFS Server'),"
415  . "('FOG_NFS_FTP_PASSWORD','This setting defines the password "
416  . "used to access flies on the nfs server used with FOG.','"
417  . STORAGE_FTP_PASSWORD
418  . "','NFS Server'),"
419  . "('FOG_NFS_DATADIR','This setting defines the directory on "
420  . "the NFS server where images are stored.','"
421  . STORAGE_DATADIR
422  . "','NFS Server'),"
423  . "('FOG_NFS_DATADIR_CAPTURE','This setting defines the directory "
424  . "on the NFS server where images are captured too.','"
425  . STORAGE_DATADIR_CAPTURE
426  . "','NFS Server'),"
427  . "('FOG_NFS_BANDWIDTHPATH','This setting defines the web page "
428  . "used to acquire the bandwidth used by the nfs server.','"
429  . STORAGE_BANDWIDTHPATH
430  . "','NFS Server'),"
431  . "('FOG_CAPTURERESIZEPCT','This setting defines the amount of "
432  . "padding applied to a partition before attempting resize the "
433  . "ntfs volume and capturing it.','"
434  . CAPTURERESIZEPCT
435  . "','General Settings'),"
436  . "('FOG_WEB_HOST','This setting defines the hostname or ip "
437  . "address of the web server used with fog.','"
438  . WEB_HOST
439  . "','Web Server'),"
440  . "('FOG_WEB_ROOT','This setting defines the path to the "
441  . "fog webserver\'s root directory.','"
442  . '/fog/'
443  . "','Web Server'),"
444  . "('FOG_WOL_HOST','This setting defines the ip address "
445  . "of hostname for the server hosting the Wake-on-lan service.','"
446  . WOL_HOST
447  . "','General Settings'),"
448  . "('FOG_WOL_PATH','This setting defines the path to the files "
449  . "performing the WOL tasks.','"
450  . WOL_PATH
451  . "','General Settings'),"
452  . "('FOG_WOL_INTERFACE','This setting defines the network interface "
453  . "used in the WOL process.','"
454  . WOL_INTERFACE
455  . "','General Settings'),"
456  . "('FOG_SNAPINDIR','This setting defines the location of the "
457  . "snapin files. These files must be hosted on the web server.','"
458  . SNAPINDIR
459  . "','Web Server'),"
460  . "('FOG_CHECKIN_TIMEOUT','This setting defines the amount "
461  . "of time between client checks to determine if they are "
462  . "active clients.','"
463  . CHECKIN_TIMEOUT
464  . "','General Settings'),"
465  . "('FOG_USER_MINPASSLENGTH','This setting defines the "
466  . "minimum number of characters in a user\'s password.','"
467  . USER_MINPASSLENGTH
468  . "','User Management'),"
469  . "('FOG_NFS_ETH_MONITOR','This setting defines which "
470  . "interface is monitored for traffic summaries.','"
471  . NFS_ETH_MONITOR
472  . "','NFS Server'),"
473  . "('FOG_UDPCAST_INTERFACE', 'This setting defines the "
474  . "interface used in multicast communications.','"
475  . UDPCAST_INTERFACE
476  . "','Multicast Settings'),"
477  . "('FOG_UDPCAST_STARTINGPORT','This setting defines the "
478  . "starting port number used in multicast communications. "
479  . "This starting port number must be an even number.','"
480  . UDPCAST_STARTINGPORT
481  . "','Multicast Settings'),"
482  . "('FOG_MULTICAST_MAX_SESSIONS','This setting defines "
483  . "the maximum number of multicast sessions that can be "
484  . "running at one time.','"
485  . FOG_MULTICAST_MAX_SESSIONS
486  . "', 'Multicast Settings'),"
487  . "('FOG_JPGRAPH_VERSION','This setting defines jpgraph version to use.','"
488  . FOG_JPGRAPH_VERSION
489  . "', 'Web Server'),"
490  . "('FOG_REPORT_DIR','This setting defines the location on the "
491  . "web server of the FOG reports.','"
492  . FOG_REPORT_DIR
493  . "','Web Server'),"
494  . "('FOG_THEME','This setting defines what css style "
495  . "sheet and theme to use for FOG.','"
496  . FOG_THEME
497  . "','Web Server'),"
498  . "('FOG_CAPTUREIGNOREPAGEHIBER','This setting defines if you would "
499  . "like to remove hibernate and swap files before capturing a "
500  . "Windows image.','"
501  . FOG_CAPTUREIGNOREPAGEHIBER
502  . "','General Settings'),"
503  . "('FOG_CLIENT_DIRECTORYCLEANER_ENABLED','This setting defines if "
504  . "the Windows Service module directory cleaner should be enabled "
505  . "on client computers. This service is clean out the contents of "
506  . "a directory on when a user logs out of the workstation. "
507  . "(Valid values: 0 or 1).','1', 'FOG Client - Directory Cleaner')",
508  'CREATE TABLE `moduleStatusByHost` ('
509  . '`msID` INTEGER NOT NULL AUTO_INCREMENT,'
510  . '`msHostID` integer NOT NULL,'
511  . '`msModuleID` VARCHAR(50) NOT NULL,'
512  . '`msState` VARCHAR(1) NOT NULL,'
513  . 'PRIMARY KEY (`msID`),'
514  . 'INDEX `new_index`(`msHostID`),'
515  . 'INDEX `new_index2`(`msModuleID`)'
516  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
517  'CREATE TABLE `dirCleaner` ('
518  . '`dcID` INTEGER NOT NULL AUTO_INCREMENT,'
519  . '`dcPath` longtext NOT NULL,'
520  . 'PRIMARY KEY (`dcID`)'
521  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
522  'INSERT IGNORE INTO `globalSettings`'
523  . '(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`)'
524  . 'VALUES'
525  . "('FOG_USE_ANIMATION_EFFECTS','This setting defines if the "
526  . "FOG management portal uses animation effects on it. "
527  . "Valid values are 0 or 1', '1', 'General Settings'),"
528  . "('FOG_CLIENT_USERCLEANUP_ENABLED','This setting defines if "
529  . "user cleanup should be enabled. The User Cleanup module "
530  . "will remove all local windows users from the workstation "
531  . "on log off accept for users that are whitelisted. (Valid "
532  . "values are 0 or 1)','0','FOG Client - User Cleanup')",
533  'CREATE TABLE `userCleanup` ('
534  . '`ucID` INTEGER NOT NULL AUTO_INCREMENT,'
535  . '`ucName` VARCHAR(254) NOT NULL,'
536  . 'PRIMARY KEY (`ucID`)'
537  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
538  "INSERT IGNORE INTO `userCleanup` (`ucName`)"
539  . 'VALUES'
540  . "('admin'),"
541  . "('guest'),"
542  . "('administrator'),"
543  . "('HelpAssistant'),"
544  . "('ASPNET'),"
545  . "('SUPPORT_')",
546  'INSERT IGNORE INTO `globalSettings`'
547  . ' (`settingKey`,`settingDesc`,`settingValue`,`settingCategory`)'
548  . 'VALUES'
549  . " ('FOG_CLIENT_GREENFOG_ENABLED','This setting defines if the green "
550  . "fog module should be enabled. The green fog module will shutdown "
551  . "or restart a computer at a set time. (Valid values are 0 or 1)'"
552  . ",'1','FOG Client - Green Fog'),"
553  . "('FOG_CLIENT_AUTOLOGOFF_ENABLED','This setting defines if the "
554  . "auto log off module should be enabled. This module will log "
555  . "off any active user after X minutes of inactivity."
556  . "(Valid values are 0 or 1)','1','FOG Client - Auto Log Off'),"
557  . "('FOG_CLIENT_DISPLAYMANAGER_ENABLED','This setting defines "
558  . "if the fog display manager should be active. The fog display "
559  . "manager will reset the clients screen resolution to a fixed "
560  . "size on log off and on computer start up."
561  . "(Valid values are 0 or 1)','0','FOG Client - Display Manager'),"
562  . "('FOG_CLIENT_DISPLAYMANAGER_X','This setting defines the default "
563  . "width in pixels to reset the computer display to with the fog "
564  . "display manager service.','1024','FOG Client - Display Manager'),"
565  . "('FOG_CLIENT_DISPLAYMANAGER_Y','This setting defines the "
566  . "default height in pixels to reset the computer display to "
567  . "with the fog display manager service.','768','FOG Client - Display Manager'),"
568  . "('FOG_CLIENT_DISPLAYMANAGER_R','This setting defines the "
569  . "default refresh rate to reset the computer display to with "
570  . "the fog display manager service.','60','FOG Client - Display Manager'),"
571  . "('FOG_CLIENT_AUTOLOGOFF_BGIMAGE','This setting defines the "
572  . "location of the background image used in the auto log off "
573  . "module. The image should be 300px x 300px. This image can "
574  . "be located locally (such as c:\\\\images\\\\myimage.jpg) "
575  . "or on a web server (such as http://freeghost.sf.net/images/image.jpg)',"
576  . "'c:\\\\program files\\\\fog\\\\images\\\\alo-bg.jpg',"
577  . "'FOG Client - Auto Log Off'),"
578  . "('FOG_CLIENT_AUTOLOGOFF_MIN','This setting defines the number of "
579  . "minutes to wait before logging a user off of a PC."
580  . "(Value of 0 will disable this module.)','0', 'FOG Client - Auto Log Off'),"
581  . "('FOG_KEYMAP','This setting defines the keymap used on "
582  . "the client boot image.','','General Settings')",
583  "CREATE TABLE `hostScreenSettings` ("
584  . '`hssID` INTEGER NOT NULL AUTO_INCREMENT,'
585  . '`hssHostID` INTEGER NOT NULL,'
586  . '`hssWidth` INTEGER NOT NULL,'
587  . '`hssHeight` INTEGER NOT NULL,'
588  . '`hssRefresh` INTEGER NOT NULL,'
589  . '`hssOrientation` INTEGER NOT NULL,'
590  . '`hssOther1` INTEGER NOT NULL,'
591  . '`hssOther2` INTEGER NOT NULL,'
592  . 'PRIMARY KEY (`hssID`),'
593  . 'INDEX `new_index`(`hssHostID`)'
594  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
595  'CREATE TABLE `hostAutoLogOut` ('
596  . '`haloID` INTEGER NOT NULL AUTO_INCREMENT,'
597  . '`haloHostID` INTEGER NOT NULL,'
598  . '`haloTime` VARCHAR(10) NOT NULL,'
599  . 'PRIMARY KEY (`haloID`),'
600  . 'INDEX `new_index`(`haloHostID`)'
601  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
602  'CREATE TABLE `greenFog` ('
603  . '`gfID` INTEGER NOT NULL AUTO_INCREMENT,'
604  . '`gfHostID` INTEGER NOT NULL,'
605  . '`gfHour` INTEGER NOT NULL,'
606  . '`gfMin` INTEGER NOT NULL,'
607  . '`gfAction` varchar(2) NOT NULL,'
608  . '`gfDays` varchar(25) NOT NULL,'
609  . 'PRIMARY KEY (`gfID`),'
610  . 'INDEX `new_index`(`gfHostID`)'
611  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
612  "INSERT IGNORE INTO `globalSettings` "
613  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
614  . "VALUES "
615  . "('FOG_CLIENT_HOSTNAMECHANGER_ENABLED','This setting defines if the fog "
616  . "hostname changer should be globally active. (Valid values are 0 or 1)',"
617  . "'1', 'FOG Client - Hostname Changer')",
618  "CREATE TABLE `aloLog` ("
619  . "`alID` INTEGER NOT NULL AUTO_INCREMENT,"
620  . "`alUserName` VARCHAR(254) NOT NULL,"
621  . "`alHostID` INTEGER NOT NULL,"
622  . "`alDateTime` DATETIME NOT NULL,"
623  . "`alAnon1` VARCHAR(254) NOT NULL,"
624  . "`alAnon2` VARCHAR(254) NOT NULL,"
625  . "`alAnon3` VARCHAR(254) NOT NULL,"
626  . "PRIMARY KEY (`alID`),"
627  . "INDEX `new_index`(`alUserName`),"
628  . "INDEX `new_index2`(`alHostID`),"
629  . "INDEX `new_index3`(`alDateTime`)"
630  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
631  "UPDATE `schemaVersion` set vValue = '9'",
632 );
633 // 10
634 $this->schema[] = array(
635  "CREATE TABLE `imagingLog` ("
636  . "`ilID` INTEGER NOT NULL AUTO_INCREMENT,"
637  . "`ilHostID` INTEGER NOT NULL,"
638  . "`ilStartTime` DATETIME NOT NULL,"
639  . "`ilFinishTime` DATETIME NOT NULL,"
640  . "`ilImageName` VARCHAR(64) NOT NULL,"
641  . "PRIMARY KEY (`ilID`),"
642  . "INDEX `new_index`(`ilHostID`)"
643  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
644  "INSERT IGNORE INTO `globalSettings` "
645  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
646  . "VALUES "
647  . "('FOG_CLIENT_SNAPIN_ENABLED','This setting defines if the "
648  . "fog snapin installer should be globally active. (Valid values are 0 or 1)'"
649  . ",'1', 'FOG Client - Snapins')",
650  "ALTER TABLE `snapins` CHANGE `sAnon1` `sRunWith` VARCHAR(245) NOT NULL",
651  "ALTER TABLE `snapinTasks` ADD COLUMN `stReturnCode` "
652  . "INTEGER NOT NULL AFTER `stSnapinID`,ADD COLUMN "
653  . "`stReturnDetails` varchar(250) NOT NULL AFTER `stReturnCode`",
654  "ALTER TABLE `snapins` CHANGE `sAnon2` `sRunWithArgs` "
655  . "VARCHAR(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL",
656  "UPDATE `schemaVersion` set vValue = '10'",
657 );
658 // 11
659 $this->schema[] = array(
660  "ALTER TABLE `hosts` CHANGE `hostAnon2` "
661  . "`hostKernelArgs` VARCHAR(250) CHARACTER "
662  . "SET utf8 COLLATE utf8_general_ci NOT NULL",
663  "INSERT IGNORE INTO `globalSettings` "
664  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
665  . "VALUES "
666  . "('FOG_KERNEL_ARGS', 'This setting allows you to add additional "
667  . "kernel arguments to the client boot image. This setting is global "
668  . "for all hosts.','', 'General Settings')",
669  "UPDATE `schemaVersion` set vValue = '11'",
670 );
671 // 12
672 $this->schema[] = array(
673  "INSERT IGNORE INTO `globalSettings` "
674  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
675  . "VALUES "
676  . "('FOG_CLIENT_CLIENTUPDATER_ENABLED','This setting defines if "
677  . "the fog client updater should be globally active. "
678  . "(Valid values are 0 or 1)','1','FOG Client - Client Updater'),"
679  . "('FOG_CLIENT_HOSTREGISTER_ENABLED','This setting defines if the "
680  . "fog host register should be globally active. "
681  . "(Valid values are 0 or 1)','1','FOG Client - Host Register'),"
682  . "('FOG_CLIENT_PRINTERMANAGER_ENABLED','This setting defines if the "
683  . "fog printer maanger should be globally active. "
684  . "(Valid values are 0 or 1)','1','FOG Client - Printer Manager'),"
685  . "('FOG_CLIENT_TASKREBOOT_ENABLED','This setting defines if the fog "
686  . "task reboot should be globally active. "
687  . "(Valid values are 0 or 1)','1','FOG Client - Task Reboot'),"
688  . "('FOG_CLIENT_USERTRACKER_ENABLED','This setting defines if the fog "
689  . "user tracker should be globally active. "
690  . "(Valid values are 0 or 1)','1','FOG Client - User Tracker')",
691  "UPDATE `schemaVersion` set vValue = '12'",
692 );
693 // 13
694 $this->schema[] = array(
695  "INSERT IGNORE INTO `globalSettings` "
696  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
697  . "VALUES "
698  . "('FOG_AD_DEFAULT_DOMAINNAME','This setting defines the default "
699  . "value to populate the host\'s Active Directory domain name value.',"
700  . "'','Active Directory Defaults'),"
701  . "('FOG_AD_DEFAULT_OU','This setting defines the default value to "
702  . "populate the host\'s Active Directory OU value.',"
703  . "'','Active Directory Defaults'),"
704  . "('FOG_AD_DEFAULT_USER','This setting defines the default value to "
705  . "populate the host\'s Active Directory user name value.',"
706  . "'', 'Active Directory Defaults'),"
707  . "('FOG_AD_DEFAULT_PASSWORD','This setting defines the default value "
708  . "to populate the host\'s Active Directory password value. This "
709  . "settings must be encrypted.','','Active Directory Defaults')",
710  "UPDATE `schemaVersion` set vValue = '13'",
711 );
712 // 14
713 $this->schema[] = array(
714  "INSERT IGNORE INTO `globalSettings` "
715  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) VALUES "
716  . "('FOG_UTIL_DIR','This setting defines the location of the fog "
717  . "utility directory.','/opt/fog/utils','FOG Utils')",
718  "ALTER TABLE `users` ADD COLUMN `uType` VARCHAR(2) NOT NULL AFTER `uCreateBy`",
719  "UPDATE `schemaVersion` set vValue = '14'",
720 );
721 // 15
722 $this->schema[] = array(
723  "INSERT IGNORE INTO `globalSettings` "
724  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
725  . "VALUES "
726  . "('FOG_PLUGINSYS_ENABLED', 'This setting defines if the fog plugin "
727  . "system should be enabled.','0','Plugin System'),"
728  . "('FOG_PLUGINSYS_DIR','This setting defines the base location "
729  . "of fog plugins.','./plugins','Plugin System')",
730  "CREATE TABLE `plugins` ("
731  . "`pID` INTEGER NOT NULL AUTO_INCREMENT,"
732  . "`pName` VARCHAR(100) NOT NULL,"
733  . "`pState` CHAR NOT NULL,"
734  . "`pInstalled` CHAR NOT NULL,"
735  . "`pVersion` VARCHAR(100) NOT NULL,"
736  . "`pAnon1` VARCHAR(100) NOT NULL,"
737  . "`pAnon2` VARCHAR(100) NOT NULL,"
738  . "`pAnon3` VARCHAR(100) NOT NULL,"
739  . "`pAnon4` VARCHAR(100) NOT NULL,"
740  . "`pAnon5` VARCHAR(100) NOT NULL,"
741  . "PRIMARY KEY (`pID`),"
742  . "INDEX `new_index`(`pName`),"
743  . "INDEX `new_index1`(`pState`),"
744  . "INDEX `new_index2`(`pInstalled`),"
745  . "INDEX `new_index3`(`pVersion`)"
746  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
747  "ALTER TABLE `hosts` CHANGE `hostAnon3` `hostKernel` VARCHAR(250) "
748  . "CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,"
749  . "CHANGE `hostAnon4` `hostDevice` VARCHAR(250) CHARACTER "
750  . "SET utf8 COLLATE utf8_general_ci NOT NULL",
751  "UPDATE `schemaVersion` set vValue = '15'",
752 );
753 // 16
754 $this->schema[] = array(
755  "ALTER TABLE `tasks` ADD COLUMN `taskBPM` varchar(250) NOT NULL AFTER "
756  . "`taskPCT`, ADD COLUMN `taskTimeElapsed` varchar(250) NOT NULL AFTER "
757  . "`taskBPM`, ADD COLUMN `taskTimeRemaining` varchar(250) NOT NULL AFTER "
758  . "`taskTimeElapsed`, ADD COLUMN `taskDataCopied` varchar(250) NOT NULL "
759  . "AFTER `taskTimeRemaining`, ADD COLUMN `taskPercentText` varchar(250) NOT "
760  . "NULL AFTER `taskDataCopied`, ADD COLUMN `taskDataTotal` VARCHAR(250) NOT "
761  . "NULL AFTER `taskPercentText`",
762  "CREATE TABLE `nfsGroups` ("
763  . "`ngID` integer NOT NULL AUTO_INCREMENT,"
764  . "`ngName` varchar(250) NOT NULL,"
765  . "`ngDesc` longtext NOT NULL,"
766  . "PRIMARY KEY (`ngID`)"
767  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
768  "CREATE TABLE `nfsGroupMembers` ("
769  . "`ngmID` integer NOT NULL AUTO_INCREMENT,"
770  . "`ngmMemberName` varchar(250) NOT NULL,"
771  . "`ngmMemberDescription` longtext NOT NULL,"
772  . "`ngmIsMasterNode` char NOT NULL,"
773  . "`ngmGroupID` integer NOT NULL,"
774  . "`ngmRootPath` longtext NOT NULL,"
775  . "`ngmIsEnabled` char NOT NULL,"
776  . "`ngmHostname` varchar(250) NOT NULL,"
777  . "`ngmMaxClients` integer NOT NULL,"
778  . "`ngmUser` varchar(250) NOT NULL,"
779  . "`ngmPass` varchar(250) NOT NULL,"
780  . "`ngmKey` varchar(250) NOT NULL,"
781  . " PRIMARY KEY (`ngmID`),"
782  . "INDEX `new_index`(`ngmMemberName`),"
783  . "INDEX `new_index2`(`ngmIsMasterNode`),"
784  . "INDEX `new_index3`(`ngmGroupID`),"
785  . "INDEX `new_index4`(`ngmIsEnabled`)"
786  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
787  "ALTER TABLE `images` ADD COLUMN `imageNFSGroupID` integer "
788  . "NOT NULL AFTER `imageDD`,"
789  . "ADD INDEX `new_index3`(`imageNFSGroupID`)",
790  "ALTER TABLE `tasks` ADD COLUMN `taskNFSGroupID` integer "
791  . "NOT NULL AFTER `taskDataTotal`,"
792  . "ADD COLUMN `taskNFSMemberID` integer NOT NULL AFTER `taskNFSGroupID`,"
793  . "ADD COLUMN `taskNFSFailures` char NOT NULL AFTER `taskNFSMemberID`,"
794  . "ADD COLUMN `taskLastMemberID` integer NOT NULL AFTER `taskNFSFailures`,"
795  . "ADD INDEX `new_index5`(`taskNFSGroupID`),"
796  . "ADD INDEX `new_index6`(`taskNFSMemberID`),"
797  . "ADD INDEX `new_index7`(`taskNFSFailures`),"
798  . "ADD INDEX `new_index8`(`taskLastMemberID`)",
799  "CREATE TABLE `nfsFailures` ("
800  . "`nfID` integer NOT NULL AUTO_INCREMENT,"
801  . "`nfNodeID` integer NOT NULL,"
802  . "`nfTaskID` integer NOT NULL,"
803  . "`nfHostID` integer NOT NULL,"
804  . "`nfGroupID` integer NOT NULL,"
805  . "`nfDateTime` integer NOT NULL,"
806  . "PRIMARY KEY (`nfID`),"
807  . "INDEX `new_index`(`nfNodeID`),"
808  . "INDEX `new_index1`(`nfTaskID`),"
809  . "INDEX `new_index2`(`nfHostID`),"
810  . "INDEX `new_index3`(`nfGroupID`)"
811  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
812  "ALTER TABLE `nfsFailures` MODIFY COLUMN `nfDateTime` datetime NOT NULL,"
813  . "ADD INDEX `new_index4`(`nfDateTime`)",
814  "ALTER TABLE `multicastSessions` CHANGE `msAnon2` `msNFSGroupID` integer "
815  . "NOT NULL, ADD INDEX `new_index`(`msNFSGroupID`)",
816  "INSERT IGNORE INTO `nfsGroups` "
817  . "(`ngName`,`ngDesc`) "
818  . "VALUES "
819  . "('default','Auto generated fog nfs group')",
820  "INSERT IGNORE INTO `nfsGroupMembers` "
821  . "(`ngmMemberName`,`ngmMemberDescription`,`ngmIsMasterNode`,"
822  . "`ngmGroupID`,`ngmRootPath`,`ngmIsEnabled`,`ngmHostname`,"
823  . "`ngmMaxClients`,`ngmUser`,`ngmPass`) "
824  . "VALUES "
825  . "('DefaultMember','Auto generated fog nfs group member','1',"
826  . "'1','/images','1','"
827  . STORAGE_HOST
828  . "','10','"
829  . STORAGE_FTP_USERNAME
830  . "','"
831  . STORAGE_FTP_PASSWORD
832  . "')",
833  "UPDATE `images` set imageNFSGroupID = '1'",
834  "DELETE FROM `globalSettings` WHERE `settingKey` IN "
835  . "('FOG_NFS_HOST','FOG_NFS_FTP_USERNAME','FOG_NFS_FTP_PASSWORD',"
836  . "'FOG_NFS_DATADIR','FOG_NFS_DATADIR_CAPTURE')",
837  "INSERT IGNORE INTO `globalSettings` "
838  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
839  . "VALUES "
840  . "('FOG_STORAGENODE_MYSQLUSER','This setting defines the username "
841  . "the storage nodes should use to connect to the fog server.',"
842  . "'fogstorage','FOG Storage Nodes')",
843  "UPDATE `schemaVersion` set `vValue`='16'",
844 );
845 // 17
846 $this->schema[] = array(
847  "INSERT IGNORE INTO `globalSettings` "
848  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
849  . "VALUES "
850  . "('FOG_SSH_USERNAME','This setting defines the username used "
851  . "for the ssh client.','root','SSH Client'),"
852  . "('FOG_SSH_PORT','This setting defines the port to use for the ssh client.',"
853  . "'22','SSH Client'),"
854  . "('FOG_VIEW_DEFAULT_SCREEN','This setting defines which page is "
855  . "displayed in each section, valid settings includes <b>LIST</b> "
856  . "and <b>SEARCH</b>.','SEARCH','FOG View Settings')",
857  "UPDATE `schemaVersion` set vValue = '17'",
858 );
859 // 18
860 $this->schema[] = array(
861  "INSERT IGNORE INTO `supportedOS` "
862  . "(`osName`,`osValue`) "
863  . "VALUES "
864  . "('Windows 7','5'),"
865  . "('Windows 8','6')",
866  "UPDATE `schemaVersion` set `vValue`='18'",
867 );
868 // 19
869 $this->schema[] = array(
870  "INSERT IGNORE INTO `globalSettings` "
871  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
872  . "VALUES "
873  . "('FOG_PXE_MENU_TIMEOUT','This setting defines the default value "
874  . "for the pxe menu timeout.','3','FOG PXE Settings'),"
875  . "('FOG_PROXY_IP','This setting defines the proxy ip address to use.',"
876  . "'','General Settings'),"
877  . "('FOG_PROXY_PORT','This setting defines the proxy port address to use.',"
878  . "'','General Settings')",
879  "CREATE TABLE `scheduledTasks` ("
880  . "`stID` integer NOT NULL AUTO_INCREMENT,"
881  . "`stName` varchar(240) NOT NULL,"
882  . "`stDesc` longtext NOT NULL,"
883  . "`stType` varchar(24) NOT NULL,"
884  . "`stTaskType` varchar(24) NOT NULL,"
885  . "`stMinute` varchar(240) NOT NULL,"
886  . "`stHour` varchar(240) NOT NULL,"
887  . "`stDOM` varchar(240) NOT NULL,"
888  . "`stMonth` varchar(240) NOT NULL,"
889  . "`stDOW` varchar(240) NOT NULL,"
890  . "`stIsGroup` varchar(2) NOT NULL,"
891  . "`stGroupHostID` integer NOT NULL,"
892  . "`stShutDown` varchar(2) NOT NULL,"
893  . "`stOther1` varchar(240) NOT NULL,"
894  . "`stOther2` varchar(240) NOT NULL,"
895  . "`stOther3` varchar(240) NOT NULL,"
896  . "`stOther4` varchar(240) NOT NULL,"
897  . "`stOther5` varchar(240) NOT NULL,"
898  . "`stDateTime` BIGINT UNSIGNED NOT NULL DEFAULT 0,"
899  . "`stActive` varchar(2) NOT NULL DEFAULT 1,"
900  . "PRIMARY KEY (`stID`)"
901  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
902  "INSERT IGNORE INTO `globalSettings` "
903  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
904  . "VALUES "
905  . "('FOG_UTIL_BASE','This setting defines the location of util base, "
906  . "which is typically /opt/fog/','/opt/fog/','FOG Utils')",
907  "UPDATE `schemaVersion` set vValue = '19'",
908 );
909 // 20
910 $this->schema[] = array(
911  "INSERT IGNORE INTO `globalSettings` "
912  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
913  . "VALUES "
914  . "('FOG_PXE_MENU_HIDDEN','This setting defines if you would like the "
915  . "FOG pxe menu hidden or displayed','0','FOG PXE Settings'),"
916  . "('FOG_PXE_ADVANCED','This setting defines if you would like to "
917  . "append any settings to the end of your PXE default file.','',"
918  . "'FOG PXE Settings'),"
919  . "('FOG_USE_LEGACY_TASKLIST','This setting defines if you would like to "
920  . "use the legacy active tasks window. Note: The legacy screen will no "
921  . "longer be updated.','0','General Settings')",
922  "ALTER TABLE `globalSettings` MODIFY COLUMN `settingValue` LONGTEXT "
923  . "CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL",
924  "UPDATE `schemaVersion` set vValue = '20'",
925 );
926 // 21
927 $this->schema[] = array(
928  "CREATE TABLE `hostMAC` ("
929  . "`hmID` integer NOT NULL AUTO_INCREMENT,"
930  . "`hmHostID` integer NOT NULL,"
931  . "`hmMAC` varchar(18) NOT NULL,"
932  . "`hmDesc` longtext NOT NULL,"
933  . "PRIMARY KEY (`hmID`),"
934  . "INDEX `idxHostID`(`hmHostID`),"
935  . "INDEX `idxMac`(`hmMAC`)"
936  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
937  "CREATE TABLE `oui` ("
938  . "`ouiID` int(11) NOT NULL AUTO_INCREMENT,"
939  . "`ouiMACPrefix` varchar(8) NOT NULL,"
940  . "`ouiMan` varchar(254) NOT NULL,"
941  . "PRIMARY KEY (`ouiID`),"
942  . "KEY `idxMac` (`ouiMACPrefix`)"
943  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
944  "INSERT IGNORE INTO `globalSettings` "
945  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
946  . "VALUES "
947  . "('FOG_QUICKREG_AUTOPOP','Enable FOG Quick Registration auto "
948  . "population feature (0 = disabled, 1=enabled). If this feature "
949  . "is enabled, FOG will auto populate the host settings and "
950  . "automatically image the computer without any user intervention.',"
951  . "'0','FOG Quick Registration'),"
952  . "('FOG_QUICKREG_IMG_ID','FOG Quick Registration Image ID.',"
953  . "'-1', 'FOG Quick Registration'),"
954  . "('FOG_QUICKREG_OS_ID','FOG Quick Registration OS ID.',"
955  . "'-1', 'FOG Quick Registration'),"
956  . "('FOG_QUICKREG_SYS_NAME','FOG Quick Registration system name template. "
957  . "Use * for the autonumber feature.', 'PC-*', 'FOG Quick Registration'),"
958  . "('FOG_QUICKREG_SYS_NUMBER','FOG Quick Registration system name auto number.',"
959  . "'1','FOG Quick Registration'),"
960  . "('FOG_DEFAULT_LOCALE','Default language code to use for FOG.',"
961  . "'en', 'General Settings'),"
962  . "('FOG_HOST_LOCKUP','Should FOG attempt to see if a host is active "
963  . "and display it as part of the UI?','1','General Settings'),"
964  . "('FOG_UUID','This is a unique ID that is used to identify your "
965  . "installation. In most cases you do not want to change this value.',"
966  . "'"
967  . uniqid("", true)
968  . "','General Settings')",
969  "CREATE TABLE `pendingMACS` ("
970  . "`pmID` INTEGER NOT NULL AUTO_INCREMENT,"
971  . "`pmAddress` varchar(18) NOT NULL,"
972  . "`pmHostID` INTEGER NOT NULL,"
973  . "PRIMARY KEY (`pmID`),"
974  . "INDEX `idx_mc`(`pmAddress`),"
975  . "INDEX `idx_host`(`pmHostID`)"
976  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
977  "INSERT IGNORE INTO `globalSettings` "
978  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
979  . "VALUES "
980  . "('FOG_QUICKREG_MAX_PENDING_MACS','This setting defines how many mac "
981  . "addresses will be stored in the pending mac address table for each host.',"
982  . "'4', 'FOG Client - Host Register'),"
983  . "('FOG_QUICKREG_PENDING_MAC_FILTER','This is a list of MAC address "
984  . "fragments that is used to filter out pending mac address requests. "
985  . "For example, if you don\'t want to see pending mac address requests "
986  . "for VMWare NICs then you could filter by 00:05:69. This filter is "
987  . "comma seperated, and is used like a *starts with* filter.',"
988  . "'','FOG Client - Host Register'),"
989  . "('FOG_ADVANCED_STATISTICS','Enable the collection and display of "
990  . "advanced statistics. This information WILL be sent to a remote "
991  . "server! This information is used by the FOG team to see how "
992  . "FOG is being used. The information that will be sent includes "
993  . "the server\'s UUID value, the number of hosts present in FOG, "
994  . "and number of images on your FOG server and well as total "
995  . "image space used. (0 = disabled, 1 = enabled).',"
996  . "'0', 'General Settings')",
997  "UPDATE `schemaVersion` set vValue = '21'",
998 );
999 // 22
1000 $this->schema[] = array(
1001  "ALTER TABLE `inventory` ADD INDEX (`iHostID`)",
1002  "UPDATE `globalSettings` set `settingKey`='FOG_HOST_LOOKUP' "
1003  . "WHERE `settingKey`='FOG_HOST_LOCKUP'",
1004  "UPDATE `schemaVersion` set `vValue`='22'",
1005 );
1006 // 23
1007 $this->schema[] = array(
1008  "INSERT IGNORE INTO `globalSettings` "
1009  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
1010  . "VALUES "
1011  . "('FOG_DISABLE_CHKDSK','This is an experimental feature that will "
1012  . "can be used to not set the dirty flag on a NTFS partition after "
1013  . "resizing it. It is recommended to you run chkdsk. "
1014  . "(0 = runs chkdsk, 1 = disables chkdsk).','1','General Settings'),"
1015  . "('FOG_CHANGE_HOSTNAME_EARLY','This is an experimental feature that "
1016  . "will can be used to change the computers hostname right after "
1017  . "imaging the box, without the need for the FOG service. "
1018  . "(1 = enabled, 0 = disabled).','1','General Settings')",
1019  "UPDATE `schemaVersion` set `vValue`='23'",
1020 );
1021 // 24
1022 $this->schema[] = array(
1023  "ALTER TABLE `groups` ADD `groupKernel` VARCHAR(255) NOT NULL",
1024  "ALTER TABLE `groups` ADD `groupKernelArgs` VARCHAR(255) NOT NULL",
1025  "ALTER TABLE `groups` ADD `groupPrimaryDisk` VARCHAR(255) NOT NULL",
1026  "UPDATE `schemaVersion` set `vValue`='24'",
1027 );
1028 // 25
1029 $this->schema[] = array(
1030  "CREATE TABLE IF NOT EXISTS `os` ("
1031  . "`osID` mediumint(9) NOT NULL AUTO_INCREMENT,"
1032  . "`osName` varchar(30) NOT NULL,"
1033  . "`osDescription` text NOT NULL,"
1034  . "PRIMARY KEY (`osID`)"
1035  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
1036  "INSERT IGNORE INTO `os` "
1037  . "(`osID`, `osName`, `osDescription`) "
1038  . "VALUES "
1039  . "(1, 'Windows 2000/XP', ''),"
1040  . "(2, 'Windows Vista', ''),"
1041  . "(3, 'Windows 98', ''),"
1042  . "(4, 'Windows Other', ''),"
1043  . "(5, 'Windows 7', ''),"
1044  . "(50, 'Linux', ''),"
1045  . "(99, 'Other', '')",
1046  "ALTER TABLE `images` ADD `imageOSID` MEDIUMINT NOT NULL ",
1047  "ALTER TABLE `hosts` ADD UNIQUE (`hostMAC`)",
1048  "UPDATE `schemaVersion` set `vValue`='25'",
1049 );
1050 // 26
1051 $this->schema[] = array(
1052  "ALTER TABLE `images` CHANGE `imageSize` `imageSize` MEDIUMINT NOT NULL",
1053  "ALTER TABLE `nfsGroupMembers` ADD `ngmInterface` VARCHAR(25) NOT NULL DEFAULT '"
1054  . STORAGE_INTERFACE
1055  . "'",
1056  "ALTER TABLE `nfsGroupMembers` ADD `ngmGraphEnabled` "
1057  . "ENUM('0','1') NOT NULL DEFAULT '1'",
1058  "UPDATE `schemaVersion` set `vValue`='26'",
1059  );
1060 // 27
1061 $this->schema[] = array(
1062  "ALTER TABLE `tasks` CHANGE `taskCreateTime` `taskCreateTime` "
1063  . "TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP",
1064  "ALTER TABLE `groups` CHANGE `groupDateTime` `groupDateTime` "
1065  . "TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP",
1066  "ALTER TABLE `hosts` CHANGE `hostCreateDate` `hostCreateDate` "
1067  . "TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP",
1068  "ALTER TABLE `history` CHANGE `hTime` `hTime` "
1069  . "TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP",
1070  "ALTER TABLE `aloLog` CHANGE `alDateTime` `alDateTime` "
1071  . "TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP",
1072  "ALTER TABLE `images` CHANGE `imageDateTime` `imageDateTime` "
1073  . "TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP",
1074  "ALTER TABLE `inventory` CHANGE `iCreateDate` `iCreateDate` "
1075  . "TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP",
1076  "ALTER TABLE `nfsFailures` CHANGE `nfDateTime` `nfDateTime` "
1077  . "TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP",
1078  "ALTER TABLE `snapinJobs` CHANGE `sjCreateTime` `sjCreateTime` "
1079  . "TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP",
1080  "ALTER TABLE `snapins` CHANGE `sCreateDate` `sCreateDate` "
1081  . "TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP",
1082  "ALTER TABLE `snapinTasks` CHANGE `stCheckinDate` `stCheckinDate` "
1083  . "TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP",
1084  "ALTER TABLE `users` CHANGE `uCreateDate` `uCreateDate` "
1085  . "TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP",
1086  "ALTER TABLE `userTracking` CHANGE `utDateTime` `utDateTime` "
1087  . "TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP",
1088  "ALTER TABLE `virus` CHANGE `vDateTime` `vDateTime` "
1089  . "TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP",
1090  "UPDATE `schemaVersion` set `vValue`='27'",
1091 );
1092 // 28
1093 $this->schema[] = array(
1094  "CREATE TABLE IF NOT EXISTS `imageTypes` ("
1095  . "`imageTypeID` mediumint(9) NOT NULL auto_increment,"
1096  . "`imageTypeName` varchar(100) NOT NULL,"
1097  . "PRIMARY KEY (`imageTypeID`)"
1098  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
1099  "INSERT IGNORE INTO `imageTypes` "
1100  . "(`imageTypeID`, `imageTypeName`) "
1101  . "VALUES "
1102  . "(1, 'Single Partition (NTFS Only, Resizable)'),"
1103  . "(2, 'Multiple Partition Image - Single Disk (Not Resizable)'),"
1104  . "(3, 'Multiple Partition Image - All Disks (Not Resizable)'),"
1105  . "(4, 'Raw Image (Sector By Sector, DD, Slow)')",
1106  "UPDATE `schemaVersion` set `vValue`='28'",
1107 );
1108 // 29
1109 if (FOG_SCHEMA < $tmpSchema->get('value')) {
1110  self::$DB->query(
1111  "SELECT DISTINCT `hostImage`,`hostOS` FROM `hosts` WHERE hostImage > 0"
1112  );
1113  while ($Host = self::$DB->fetch()->get()) {
1114  $allImageID[$Host['hostImage']] = $Host['hostOS'];
1115  }
1116  foreach ((array)$allImageID as $imageID => $osID) {
1117  $Image = self::getClass('Image', $imageID);
1118  if (!$Image->isValid()) {
1119  continue;
1120  }
1121  $OS = self::getClass('OS', $osID);
1122  if (!$OS->isValid()) {
1123  continue;
1124  }
1125  if (!$Image->set('osID', $osID)->save()) {
1126  $errors[] = sprintf(
1127  '<div>Failed updating the osID of imageID: %s, osID: %s</div>',
1128  $imageID,
1129  $osID
1130  );
1131  }
1132  }
1133 }
1134 // 29
1135 $this->schema[] = array(
1136  "UPDATE `schemaVersion` SET `vValue`=29",
1137 );
1138 // 30
1139 $this->schema[] = array(
1140  "ALTER TABLE `imageTypes` ADD `imageTypeValue` VARCHAR(10) NOT NULL",
1141  "UPDATE `imageTypes` SET `imageTypeValue`='n' "
1142  . "WHERE `imageTypes`.`imageTypeID`=1",
1143  "UPDATE `imageTypes` SET `imageTypeValue`='mps' "
1144  . "WHERE `imageTypes`.`imageTypeID`=2",
1145  "UPDATE `imageTypes` SET `imageTypeValue`='mpa' "
1146  . "WHERE `imageTypes`.`imageTypeID`=3",
1147  "UPDATE `imageTypes` SET `imageTypeValue`='dd' "
1148  . "WHERE `imageTypes`.`imageTypeID`=4",
1149  "UPDATE `images` SET `imageDD`='4' WHERE `imageDD`='3'",
1150  "UPDATE `images` SET `imageDD`='3' WHERE `imageDD`='2'",
1151  "UPDATE `images` SET `imageDD`='2' WHERE `imageDD`='1'",
1152  "UPDATE `images` SET `imageDD`='1' WHERE `imageDD`='0'",
1153  "ALTER TABLE `images` CHANGE `imageDD` `imageTypeID` MEDIUMINT NOT NULL",
1154  "UPDATE `schemaVersion` set `vValue`='30'",
1155 );
1156 // 31
1157 $this->schema[] = array(
1158  "ALTER TABLE `scheduledTasks` CHANGE `stIsGroup` `stIsGroup` VARCHAR(2) "
1159  . "CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0'",
1160  "UPDATE `schemaVersion` set `vValue`='31'",
1161 );
1162 // 32
1163 $this->schema[] = array(
1164  "CREATE TABLE IF NOT EXISTS `taskStates` ("
1165  . "`tsID` int(11) NOT NULL,"
1166  . "`tsName` varchar(30) NOT NULL,"
1167  . "`tsDescription` text NOT NULL,"
1168  . "`tsOrder` tinyint(4) NOT NULL DEFAULT '0',"
1169  . "PRIMARY KEY (`tsID`)"
1170  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
1171  "INSERT IGNORE INTO `taskStates` "
1172  . "(`tsID`, `tsName`, `tsDescription`, `tsOrder`) VALUES "
1173  . "(1,'Queued','Task has been created and FOG is "
1174  . "waiting for the Host to check-in.', '1'),"
1175  . "(2, 'In-Progress', 'Host is currently Imaging.', '2'),"
1176  . "(3, 'Complete', 'Imaging has been completed.', '3')",
1177  "ALTER TABLE `tasks` CHANGE `taskState` `taskStateID` INT( 11 ) NOT NULL",
1178  "UPDATE `tasks` SET `taskType` = '1' WHERE `taskType`='d'",
1179  "UPDATE `tasks` SET `taskType` = '2' WHERE `taskType`='u'",
1180  "UPDATE `tasks` SET `taskType` = '3' WHERE `taskType`='x'",
1181  "UPDATE `tasks` SET `taskType` = '4' WHERE `taskType`='w'",
1182  "UPDATE `tasks` SET `taskType` = '5' WHERE `taskType`='m'",
1183  "UPDATE `tasks` SET `taskType` = '6' WHERE `taskType`='t'",
1184  "UPDATE `tasks` SET `taskType` = '7' WHERE `taskType`='r'",
1185  "UPDATE `tasks` SET `taskType` = '8' WHERE `taskType`='c'",
1186  "UPDATE `tasks` SET `taskType` = '9' WHERE `taskType`='v'",
1187  "UPDATE `tasks` SET `taskType` = '10' WHERE `taskType`='i'",
1188  "UPDATE `tasks` SET `taskType` = '11' WHERE `taskType`='j'",
1189  "UPDATE `tasks` SET `taskType` = '12' WHERE `taskType`='s'",
1190  "UPDATE `tasks` SET `taskType` = '13' WHERE `taskType`='l'",
1191  "UPDATE `tasks` SET `taskType` = '14' WHERE `taskType`='o'",
1192  "ALTER TABLE `tasks` CHANGE `taskType` `taskTypeID` MEDIUMINT NOT NULL ",
1193  "CREATE TABLE IF NOT EXISTS `taskTypes` ("
1194  . "`ttID` mediumint(9) NOT NULL AUTO_INCREMENT,"
1195  . "`ttName` varchar(30) NOT NULL,"
1196  . "`ttDescription` text NOT NULL,"
1197  . "`ttIcon` varchar(30) NOT NULL,"
1198  . "`ttKernelTemplate` text NOT NULL,"
1199  . "`ttType` enum('fog','user') NOT NULL DEFAULT 'user',"
1200  . "`ttIsAdvanced` enum('0','1') NOT NULL DEFAULT '0',"
1201  . "`ttIsAccess` enum('both','host','group') NOT NULL DEFAULT 'both',"
1202  . "PRIMARY KEY (`ttID`)"
1203  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
1204  "INSERT IGNORE INTO `taskTypes` "
1205  . "(`ttID`,`ttName`,`ttDescription`,`ttIcon`,"
1206  . "`ttKernelTemplate`,`ttType`,`ttIsAdvanced`,`ttIsAccess`) "
1207  . "VALUES "
1208  . "(1,'Deploy','Deploy action will send an image saved on the "
1209  . "FOG server to the client computer with all included snapins.',"
1210  . "'senddebug.png', 'type=down', 'fog', '0', 'both'),"
1211  . "(2,'Capture','Capture will pull an image from a client computer "
1212  . "that will be saved on the server.','restoredebug.png',"
1213  . "'type=up','fog','0','host'),"
1214  . "(3,'Debug','Debug mode will load the boot image and load a prompt "
1215  . "so you can run any commands you wish. When you are done, you must "
1216  . "remember to remove the PXE file, by clicking on \"Active Tasks\" "
1217  . "and clicking on the \"Kill Task\" button.', 'debug.png',"
1218  . "'type=down mode=debug', 'fog', '1', 'host'),"
1219  . "(5, 'Memtest86+', 'Memtest86+ loads Memtest86+ on the client computer "
1220  . "and will have it continue to run until stopped. When you are done, "
1221  . "you must remember to remove the PXE file, by clicking on "
1222  . "\"Active Tasks\" and clicking on the \"Kill Task\" button.', "
1223  . "'memtest.png', '', 'fog', '1', 'both'),"
1224  . "(6, 'Disk Surface Test', 'Disk Surface Test checks the hard "
1225  . "drives surface sector by sector for any errors and reports "
1226  . "back if errors are present.', 'surfacetest.png', '',"
1227  . "'fog', '1', 'both'),"
1228  . "(7, 'Recover', 'Recover loads the photorec utility that can "
1229  . "be used to recover lost files from a hard disk. When "
1230  . "recovering files, make sure you save them to your "
1231  . "NFS volume (ie: /images).', 'recover.png', '', "
1232  . "'fog', '1', 'both'),"
1233  . "(8, 'Multi-Cast', 'Deploy action will send an image saved on the "
1234  . "FOG server to the client computer with all included snapins.', "
1235  . "'senddebug.png', '', 'fog', '0', 'group'),"
1236  . "(9, 'Virus Scan', 'Anti-Virus loads Clam AV on the client boot "
1237  . "image, updates the scanner and then scans the Windows partition.',"
1238  . "'clam.png', '', 'fog', '1', 'both'),"
1239  . "(10, 'Hardware Inventory', 'The hardware inventory task will "
1240  . "boot the client computer and pull basic hardware information "
1241  . "from it and report it back to the FOG server.', 'inventory.png', "
1242  . "'', 'fog', '1', 'both'),"
1243  . "(11, 'Password Reset', 'Password reset will blank out a "
1244  . "Windows user password that may have been lost or forgotten.', "
1245  . "'winpass.png', '', 'fog', '1', 'both'),"
1246  . "(12, 'All Snapins', 'This option allows you to send all the "
1247  . "snapins to host without imaging the computer. (Requires FOG "
1248  . "Client to be installed on client)', 'snap.png', '', 'fog', "
1249  . "'1', 'both'),"
1250  . "(13, 'Single Snapin', 'This option allows you to send "
1251  . "a single snapin to a host. (Requires FOG Client to be "
1252  . "installed on client)', 'snap.png', '', 'fog', "
1253  . "'1', 'both'),"
1254  . "(14, 'Wake-Up', 'Wake Up will attempt to send the "
1255  . "Wake-On-LAN packet to the computer to turn the computer "
1256  . "on. In switched environments, you typically need to "
1257  . "configure your hardware to allow for this (iphelper).', "
1258  . "'wake.png', '', 'fog', '1', 'both'),"
1259  . "(15, 'Deploy - Debug', 'Deploy - Debug mode allows FOG to "
1260  . "setup the environment to allow you send a specific image "
1261  . "to a computer, but instead of sending the image, FOG "
1262  . "will leave you at a prompt right before sending. If "
1263  . "you actually wish to send the image all you need to "
1264  . "do is type \"fog\" and hit enter.', 'senddebug.png', "
1265  . "'type=down mode=debug', 'fog', '1', 'host'),"
1266  . "(16, 'Capture - Debug', 'mode allows FOG to setup the "
1267  . "environment to allow you capture a specific image to a "
1268  . "computer, but instead of capturing the image, FOG will "
1269  . "leave you at a prompt right before restoring. If you "
1270  . "actually wish to capture the image all you need to do is "
1271  . "type \"fog\" and hit enter.', 'restoredebug.png', "
1272  . "'type=up mode=debug', 'fog', '1', 'host'),"
1273  . "(17, 'Deploy without Snapins', 'Deploy without snapins "
1274  . "allows FOG to image the workstation, but after the task "
1275  . "is complete any snapins linked to the host or group will "
1276  . "NOT be sent.', 'sendnosnapin.png', '', 'fog', '1', 'both'),"
1277  . "(18, 'Fast Wipe', 'Full Wipe will boot the client computer "
1278  . "and perform a full disk wipe. This method writes a few passes "
1279  . "of random data to the hard disk.', 'veryfastwipe.png', "
1280  . "'', 'fog', '1', 'both'),"
1281  . "(19, 'Normal Wipe', 'Normal Wipe will boot the client "
1282  . "computer and perform a simple disk wipe. This method "
1283  . "writes one pass of zero''s to the hard disk.',"
1284  . "'quickwipe.png', '', 'fog', '1', 'both'),"
1285  . "(20, 'Full Wipe', 'Full Wipe will boot the client computer "
1286  . "and perform a full disk wipe. This method writes a few "
1287  . "passes of random data to the hard disk.', 'fullwipe.png',"
1288  . "'', 'fog', '1', 'both')",
1289  "UPDATE `scheduledTasks` SET `stTaskType`='1' WHERE `stTaskType`='d'",
1290  "UPDATE `scheduledTasks` SET `stTaskType`='2' WHERE `stTaskType`='u'",
1291  "UPDATE `scheduledTasks` SET `stTaskType`='3' WHERE `stTaskType`='x'",
1292  "UPDATE `scheduledTasks` SET `stTaskType`='4' WHERE `stTaskType`='w'",
1293  "UPDATE `scheduledTasks` SET `stTaskType`='5' WHERE `stTaskType`='m'",
1294  "UPDATE `scheduledTasks` SET `stTaskType`='6' WHERE `stTaskType`='t'",
1295  "UPDATE `scheduledTasks` SET `stTaskType`='7' WHERE `stTaskType`='r'",
1296  "UPDATE `scheduledTasks` SET `stTaskType`='8' WHERE `stTaskType`='c'",
1297  "UPDATE `scheduledTasks` SET `stTaskType`='9' WHERE `stTaskType`='v'",
1298  "UPDATE `scheduledTasks` SET `stTaskType`='10' WHERE `stTaskType`='i'",
1299  "UPDATE `scheduledTasks` SET `stTaskType`='11' WHERE `stTaskType`='j'",
1300  "UPDATE `scheduledTasks` SET `stTaskType`='12' WHERE `stTaskType`='s'",
1301  "UPDATE `scheduledTasks` SET `stTaskType`='13' WHERE `stTaskType`='l'",
1302  "UPDATE `scheduledTasks` SET `stTaskType`='14' WHERE `stTaskType`='o'",
1303  "ALTER TABLE `scheduledTasks` CHANGE `stTaskType` "
1304  . "`stTaskTypeID` MEDIUMINT NOT NULL",
1305  "UPDATE `schemaVersion` set `vValue`='32'",
1306 );
1307 // 33
1308 $this->schema[] = array(
1309  "ALTER TABLE `taskTypes` CHANGE `ttKernelTemplate` "
1310  . "`ttKernelArgs` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ",
1311  "ALTER TABLE `taskTypes` ADD `ttKernel` VARCHAR( 100 ) NOT NULL AFTER `ttIcon`",
1312  "TRUNCATE `taskTypes`",
1313  "INSERT IGNORE INTO `taskTypes` "
1314  . "(`ttID`, `ttName`, `ttDescription`, `ttIcon`,"
1315  . "`ttKernel`, `ttKernelArgs`, `ttType`, `ttIsAdvanced`, `ttIsAccess`)"
1316  . "VALUES "
1317  . "(1, 'Deploy', 'Deploy action will send an image saved on the "
1318  . "FOG server to the client computer with all included snapins.',"
1319  . "'senddebug.png', '', 'type=down', 'fog', '0', 'both'),"
1320  . "(2, 'Capture', 'Capture will pull an image from a client "
1321  . "computer that will be saved on the server.', 'restoredebug.png', "
1322  . "'', 'type=up', 'fog', '0', 'host'),"
1323  . "(3, 'Debug', 'Debug mode will load the boot image and load "
1324  . "a prompt so you can run any commands you wish. When you are done, "
1325  . "you must remember to remove the PXE file, by clicking on "
1326  . "\"Active Tasks\" and clicking on the \"Kill Task\" button.', "
1327  . "'debug.png', '', 'mode=onlydebug', 'fog', '1', 'host'),"
1328  . "(4, 'Memtest86+', 'Memtest86+ loads Memtest86+ on the client "
1329  . "computer and will have it continue to run until stopped. "
1330  . "When you are done, you must remember to remove the PXE file, "
1331  . "by clicking on \"Active Tasks\" and clicking on the "
1332  . "\"Kill Task\" button.', 'memtest.png', 'fog/memtest/memtest', "
1333  . "'', 'fog', '1', 'both'),"
1334  . "(5, 'Test Disk', 'Test Disk loads the testdisk utility "
1335  . "that can be used to check a hard disk and recover lost "
1336  . "partitions.', 'testdisk.png', '', "
1337  . "'mode=checkdisk', 'fog', '1', 'both'),"
1338  . "(6, 'Disk Surface Test', 'Disk Surface Test checks the hard "
1339  . "drive\'s surface sector by sector for any errors and reports "
1340  . "back if errors are present.', 'surfacetest.png', '', "
1341  . "'mode=badblocks', 'fog', '1', 'both'),"
1342  . "(7, 'Recover', 'Recover loads the photorec utility that can "
1343  . "be used to recover lost files from a hard disk. When recovering "
1344  . "files, make sure you save them to your NFS volume "
1345  . "(ie: /images).', 'recover.png', '', 'mode=photorec', "
1346  . "'fog', '1', 'both'),"
1347  . "(8, 'Multi-Cast', 'Deploy action will send an image saved "
1348  . "on the FOG server to the client computer with all included "
1349  . "snapins.', 'senddebug.png', '', 'type=down mc=yes', 'fog', "
1350  . "'0', 'group'),"
1351  . "(10, 'Hardware Inventory', 'The hardware inventory task will "
1352  . "boot the client computer and pull basic hardware information "
1353  . "from it and report it back to the FOG server.', "
1354  . "'inventory.png', '', 'mac_deployed=\${HOST_MAC} mode=autoreg "
1355  . "deployed=1', 'fog', '1', 'both'),"
1356  . "(11, 'Password Reset', 'Password reset will blank out a "
1357  . "Windows user password that may have been lost or "
1358  . "forgotten.', 'winpass.png', '', 'mode=winpassreset', "
1359  . "'fog', '1', 'both'),"
1360  . "(12, 'All Snapins', 'This option allows you to send all "
1361  . "the snapins to host without imaging the computer. "
1362  . "(Requires FOG Client to be installed on client)', "
1363  . "'snap.png', '', '', 'fog', '1', 'both'),"
1364  . "(13, 'Single Snapin', 'This option allows you to send "
1365  . "a single snapin to a host. (Requires FOG Client to be "
1366  . "installed on client)', 'snap.png', '', '', 'fog', '1', 'both'),"
1367  . "(14, 'Wake-Up', 'Wake Up will attempt to send the "
1368  . "Wake-On-LAN packet to the computer to turn the "
1369  . "computer on. In switched environments, you "
1370  . "typically need to configure your hardware to "
1371  . "allow for this (iphelper).', 'wake.png', '', '', "
1372  . "'fog', '1', 'both'),"
1373  . "(15, 'Deploy - Debug', 'Deploy - Debug mode allows "
1374  . "FOG to setup the environment to allow you send a "
1375  . "specific image to a computer, but instead of "
1376  . "sending the image, FOG will leave you at a prompt "
1377  . "right before sending. If you actually wish to send "
1378  . "the image all you need to do is type \"fog\" and hit "
1379  . "enter.', 'senddebug.png', '', 'type=down mode=debug', "
1380  . "'fog', '1', 'host'),"
1381  . "(16, 'Capture - Debug', 'mode allows FOG to setup the "
1382  . "environment to allow you capture a specific image to "
1383  . "a computer, but instead of capturing the image, FOG "
1384  . "will leave you at a prompt right before restoring. "
1385  . "If you actually wish to capture the image all you "
1386  . "need to do is type \"fog\" and hit enter.', "
1387  . "'restoredebug.png', '', 'type=up mode=debug', "
1388  . "'fog', '1', 'host'),"
1389  . "(17, 'Deploy without Snapins', 'Deploy without snapins "
1390  . "allows FOG to image the workstation, but after the task "
1391  . "is complete any snapins linked to the host or group will "
1392  . "NOT be sent.', 'sendnosnapin.png', '', '', 'fog', '1', "
1393  . "'both'),"
1394  . "(18, 'Fast Wipe', 'Full Wipe will boot the client "
1395  . "computer and perform a full disk wipe. This method "
1396  . "writes a few passes of random data to the hard disk.',"
1397  . " 'veryfastwipe.png', '', 'mode=wipe wipemode=fast',"
1398  . "'fog', '1', 'both'),"
1399  . "(19, 'Normal Wipe', 'Normal Wipe will boot the client "
1400  . "computer and perform a simple disk wipe. This method "
1401  . "writes one pass of zero\'s to the hard disk.', "
1402  . "'quickwipe.png', '', 'mode=wipe wipemode=normal', "
1403  . "'fog', '1', 'both'),"
1404  . "(20, 'Full Wipe', 'Full Wipe will boot the client "
1405  . "computer and perform a full disk wipe. This method "
1406  . "writes a few passes of random data to the hard disk.',"
1407  . "'fullwipe.png', '', 'mode=wipe wipemode=full', 'fog',"
1408  . "'1', 'both'),"
1409  . "(21, 'Virus Scan', 'Anti-Virus loads Clam AV on the "
1410  . "client boot image, updates the scanner and then scans "
1411  . "the Windows partition.', 'clam.png', '', 'mode=clamav "
1412  . "avmode=s', 'fog', '1', 'both'),"
1413  . "(22, 'Virus Scan - Quarantine', 'Anti-Virus loads Clam "
1414  . "AV on the client boot image, updates the scanner and "
1415  . "then scans the Windows partition.', 'clam.png', '', "
1416  . "'mode=clamav avmode=q', 'fog', '1', 'both')"
1417 );
1418 // 34
1419 $this->schema[] = array(
1420  "CREATE TABLE IF NOT EXISTS `modules` ("
1421  . "`id` mediumint(9) NOT NULL AUTO_INCREMENT, "
1422  . "`name` varchar(50) NOT NULL, `short_name` "
1423  . "varchar(30) NOT NULL, `description` text "
1424  . "NOT NULL, PRIMARY KEY (`id`)"
1425  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
1426  "INSERT IGNORE INTO `modules` "
1427  . "(`id`, `name`, `short_name`, `description`) "
1428  . "VALUES "
1429  . "(1,'Directory Cleaner','dircleanup','This setting will enable or "
1430  . "disable the directory cleaner service module on this specific host. "
1431  . "If the module is globally disabled, this setting is ignored.'),"
1432  . "(2,'User Cleanup','usercleanup','This setting will enable or "
1433  . "disable the user cleaner service module on this specific host. If "
1434  . "the module is globally disabled, this setting is ignored. The user "
1435  . "clean up service will remove all stale users on the local machine, "
1436  . "accept for user accounts that are whitelisted. This is typically "
1437  . "used when dynamic local users is implemented on the workstation.'),"
1438  . "(3,'Display Manager','displaymanager','This setting will enable or "
1439  . "disable the display manager service module on this specific host. "
1440  . "If the module is globally disabled, this setting is ignored.'),"
1441  . "(4,'Auto Log Out','autologout','This setting will enable or "
1442  . "disable the auto log out service module on this specific host. "
1443  . "If the module is globally disabled, this setting is ignored.'),"
1444  . "(5,'Green FOG','greenfog','This setting will enable or "
1445  . "disable the green fog service module on this specific host. "
1446  . "If the module is globally disabled, this setting is ignored.'),"
1447  . "(6,'Snapins','snapin','This setting will enable or disable "
1448  . "the snapin service module on this specific host. If the module "
1449  . "is globally disabled, this setting is ignored.'),"
1450  . "(7,'Client Updater','clientupdater','This setting will enable or "
1451  . "disable the client updater service module on this specific host. "
1452  . "If the module is globally disabled, this setting is ignored.'),"
1453  . "(8,'Host Registration','hostregister','This setting will enable or "
1454  . "disable the host register service module on this specific host. "
1455  . "If the module is globally disabled, this setting is ignored.'),"
1456  . "(9,'Hostname Changer','hostnamechanger','This setting will enable or "
1457  . "disable the hostname changer module on this specific host. "
1458  . "If the module is globally disabled, this setting is ignored.'),"
1459  . "(10,'Printer Manager','printermanager','This setting will enable or "
1460  . "disable the printer manager service module on this specific host. "
1461  . "If the module is globally disabled, this setting is ignored.'),"
1462  . "(11,'Task Reboot','taskreboot','This setting will enable or "
1463  . "disable the task reboot service module on this specific host. "
1464  . "If the module is globally disabled, this setting is ignored.'),"
1465  . "(12,'User Tracker','usertracker','This setting will enable or "
1466  . "disable the user tracker service module on this specific host. "
1467  . "If the module is globally disabled, this setting is ignored.')",
1468  "DELETE FROM `moduleStatusByHost` WHERE `msState`='0'",
1469  "UPDATE `moduleStatusByHost` SET "
1470  . "`msModuleID`='1' WHERE `msModuleID`='dircleanup'",
1471  "UPDATE `moduleStatusByHost` SET "
1472  . "`msModuleID`='2' WHERE `msModuleID`='usercleanup'",
1473  "UPDATE `moduleStatusByHost` SET "
1474  . "`msModuleID`='3' WHERE `msModuleID`='displaymanager'",
1475  "UPDATE `moduleStatusByHost` SET "
1476  . "`msModuleID`='4' WHERE `msModuleID`='autologout'",
1477  "UPDATE `moduleStatusByHost` SET "
1478  . "`msModuleID`='5' WHERE `msModuleID`='greenfog'",
1479  "UPDATE `moduleStatusByHost` SET "
1480  . "`msModuleID`='6' WHERE `msModuleID`='snapin'",
1481  "UPDATE `moduleStatusByHost` SET "
1482  . "`msModuleID`='7' WHERE `msModuleID`='clientupdater'",
1483  "UPDATE `moduleStatusByHost` SET "
1484  . "`msModuleID`='8' WHERE `msModuleID`='hostregister'",
1485  "UPDATE `moduleStatusByHost` SET "
1486  . "`msModuleID`='9' WHERE `msModuleID`='hostnamechanger'",
1487  "UPDATE `moduleStatusByHost` SET "
1488  . "`msModuleID`='10' WHERE `msModuleID`='printermanager'",
1489  "UPDATE `moduleStatusByHost` SET "
1490  . "`msModuleID`='11' WHERE `msModuleID`='taskreboot'",
1491  "UPDATE `moduleStatusByHost` SET "
1492  . "`msModuleID`='12' WHERE `msModuleID`='usertracker'",
1493  "ALTER TABLE `moduleStatusByHost` CHANGE "
1494  . "`msModuleID` `msModuleID` INT NOT NULL",
1495  "ALTER TABLE `moduleStatusByHost` ADD UNIQUE "
1496  . "(`msHostID`,`msModuleID`)",
1497  "ALTER TABLE `snapinAssoc` ADD UNIQUE (`saHostID` ,`saSnapinID`)",
1498 );
1499 // 35
1500 $this->schema[] = array(
1501  "TRUNCATE `taskStates`",
1502  "INSERT IGNORE INTO `taskStates` "
1503  . "(`tsID`,`tsName`,`tsDescription`,`tsOrder`) "
1504  . "VALUES "
1505  . "(1,'Queued','Task has been created and FOG is waiting for the Host "
1506  . "to check-in.','1'),"
1507  . "(2,'Checked In','PC has checked in and is in queue for imaging','2'),"
1508  . "(3,'In-Progress','Host is currently Imaging.','3'),"
1509  . "(4,'Complete','Imaging has been completed.','4'),"
1510  . "(5,'Cancelled','Task was aborted by user','5')"
1511 );
1512 // 36
1513 $this->schema[] = array(
1514  "ALTER TABLE `groups` ADD UNIQUE ( `groupName` )",
1515 );
1516 // 37
1517 $this->schema[] = array(
1518  "CREATE TABLE IF NOT EXISTS `taskLog` ("
1519  . "`id` mediumint(9) NOT NULL AUTO_INCREMENT,"
1520  . "`taskID` mediumtext NOT NULL,"
1521  . "`taskStateID` mediumint(9) NOT NULL,"
1522  . "`ip` varchar(15) NOT NULL,"
1523  . "`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,"
1524  . "`createdBy` VARCHAR(30) NOT NULL,"
1525  . "PRIMARY KEY (`id`)"
1526  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
1527 );
1528 // 38
1529 $this->schema[] = array(
1530  "ALTER TABLE `nfsGroupMembers` ADD UNIQUE (`ngmMemberName`)",
1531  "ALTER TABLE `nfsGroups` ADD UNIQUE (`ngName`)"
1532 );
1533 // 39
1534 $this->schema[] = array(
1535  "INSERT IGNORE INTO `os` "
1536  . "(`osID`,`osName`,`osDescription`) "
1537  . "VALUES "
1538  . "('6','Windows 8','')",
1539  "ALTER TABLE `hosts` drop column `hostOS`"
1540 );
1541 // 40
1542 $this->schema[] = array(
1543  "INSERT IGNORE INTO `globalSettings` "
1544  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
1545  . "VALUES "
1546  . "('FOG_PIGZ_COMP','PIGZ Compression Rating','9','FOG PXE Settings')",
1547 );
1548 // 41
1549 $this->schema[] = array(
1550  "ALTER TABLE `imagingLog` ADD `ilType` VARCHAR(64) NOT NULL"
1551 );
1552 // 42
1553 $this->schema[] = array(
1554  "ALTER TABLE `images` CHANGE `imageSize` `imageSize` BIGINT NOT NULL"
1555 );
1556 // 43
1557 $this->schema[] = array(
1558  "INSERT IGNORE INTO `globalSettings` "
1559  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
1560  . "VALUES "
1561  . "('FOG_KEY_SEQUENCE','Key Sequence for boot prompt.','0','FOG Boot Setting')"
1562 );
1563 // 44
1564 $this->schema[] = array(
1565  "CREATE TABLE `keySequence` ("
1566  . "`ksID` INTEGER NOT NULL AUTO_INCREMENT,"
1567  . "`ksValue` varchar(25) NOT NULL,"
1568  . "`ksAscii` varchar(25) NOT NULL,"
1569  . "PRIMARY KEY (`ksID`)"
1570  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
1571 );
1573  'CTRL + A' => '0x01',
1574  'CTRL + B' => '0x02',
1575  'CTRL + C' => '0x03',
1576  'CTRL + D' => '0x04',
1577  'CTRL + E' => '0x05',
1578  'CTRL + F' => '0x06',
1579  'CTRL + G' => '0x07',
1580  'CTRL + H' => '0x08',
1581  'CTRL + I' => '0x09',
1582  'CTRL + J' => '0x0a',
1583  'CTRL + K' => '0x0b',
1584  'CTRL + L' => '0x0c',
1585  'CTRL + M' => '0x0d',
1586  'CTRL + N' => '0x0e',
1587  'CTRL + O' => '0x0f',
1588  'CTRL + P' => '0x10',
1589  'CTRL + Q' => '0x11',
1590  'CTRL + R' => '0x12',
1591  'CTRL + S' => '0x13',
1592  'CTRL + T' => '0x14',
1593  'CTRL + U' => '0x15',
1594  'CTRL + V' => '0x16',
1595  'CTRL + W' => '0x17',
1596  'CTRL + X' => '0x18',
1597  'CTRL + Y' => '0x19',
1598  'CTRL + Z' => '0x1a',
1599  'F5' => '0x107e',
1600  'F6' => '0x127e',
1601  'F7' => '0x137e',
1602  'F8' => '0x147e',
1603  'F9' => '0x157e',
1604  'F10' => '0x167e',
1605  'F11' => '0x187e',
1606  'F12' => '0x197e',
1607  'ESC' => '0x1b',
1608 );
1609 // 45 - 79 setup
1610 $keys = array();
1611 foreach ($keySequences as $value => $ascii) {
1612  $this->schema[] = array();
1613  $keys[] = sprintf(
1614  "('%s','%s')",
1615  $value,
1616  $ascii
1617  );
1618 }
1619 // 79
1620 $this->schema[count($this->schema) - 1] = array(
1621  "INSERT IGNORE INTO `keySequence` "
1622  . "(`ksValue`,`ksAscii`) "
1623  . "VALUES "
1624  . implode(',', $keys)
1625 );
1626 // 80
1627 $this->schema[] = array(
1628  "ALTER TABLE `tasks` "
1629  . "ADD COLUMN `taskShutdown` char "
1630  . "NOT NULL AFTER `taskLastMemberID`",
1631 );
1632 // 81
1633 $this->schema[] = array(
1634  "ALTER TABLE `images` "
1635  . "ADD COLUMN `imageLegacy` char NOT NULL AFTER `imageOSID`",
1636  "UPDATE `images` set imageLegacy = '1' where 1 = 1",
1637 );
1638 // 82
1639 $this->schema[] = array(
1640  "INSERT IGNORE INTO `globalSettings` "
1641  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
1642  . "VALUES "
1643  . "('FOG_LEGACY_FLAG_IN_GUI','This setting allows you to set "
1644  . "whether or not an image is legacy. "
1645  . "(Valid values are 0 or 1)','0','General Settings')"
1646 );
1647 // 83
1648 $this->schema[] = array(
1649  "INSERT IGNORE INTO `globalSettings` "
1650  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
1651  . "VALUES "
1652  . "('FOG_PROXY_USERNAME','This setting defines the proxy username to use.',"
1653  . "'','General Settings'),"
1654  . "('FOG_PROXY_PASSWORD','This setting defines the proxy password to use.',"
1655  . "'','General Settings')",
1656  "UPDATE `globalSettings` SET `settingCategory`='Proxy Settings' "
1657  . "WHERE `globalSettings`.`settingKey` LIKE 'FOG_PROXY%'",
1658 );
1659 // 84
1660 $this->schema[] = array(
1661  "INSERT IGNORE INTO `globalSettings` "
1662  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
1663  . "VALUES "
1664  . "('FOG_NO_MENU','This setting sets the system to no menu, if "
1665  . "there is no task set, it boots to first device.','','FOG Boot Settings')",
1666 );
1667 // 85
1668 $this->schema[] = array(
1669  "UPDATE `globalSettings` SET `settingCategory`='FOG Boot Settings' "
1670  . "WHERE `settingCategory`='FOG PXE Settings' OR "
1671  . "`settingCategory`='FOG Boot Setting'",
1672 );
1673 // 86
1674 $this->schema[] = array(
1675  "INSERT IGNORE INTO `globalSettings` "
1676  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
1677  . "VALUES "
1678  . "('FOG_TFTP_PXE_KERNEL_32','Location of the 32 bit kernel file on "
1679  . "the PXE server, this should point to the kernel itself.',"
1680  . "'bzImage32','TFTP Server'),"
1681  . "('FOG_PXE_BOOT_IMAGE_32','The settings defines where the 32 bit "
1682  . "fog boot file system image is located.','init_32.xz','TFTP Server')",
1683 );
1684 // 87 - used to be FOG_MINING_ENABLE but was entirely removed
1685 $this->schema[] = array();
1686 // 88
1687 $this->schema[] = array(
1688  "ALTER TABLE `images` "
1689  . "ADD COLUMN `imageLastDeploy` DATETIME NOT NULL AFTER `imageLegacy`",
1690 );
1691 // 89
1692 $this->schema[] = array(
1693  "ALTER TABLE `hosts` "
1694  . "ADD COLUMN `hostLastDeploy` DATETIME NOT NULL AFTER `hostCreateDate`",
1695 );
1696 // 90
1697 $this->schema[] = array(
1698  "INSERT IGNORE INTO `globalSettings` "
1699  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
1700  . "VALUES "
1701  . "('FOG_BOOT_EXIT_TYPE','The method of booting to the hard drive. "
1702  . "Most will accept sanboot, but some require exit.','','FOG Boot Settings')",
1703 );
1704 // 91 - used to be FOG_MINING_MAX_CORES but was entirely removed
1705 $this->schema[] = array();
1706 // 92
1707 $this->schema[] = array(
1708  "ALTER TABLE `snapinJobs` "
1709  . "ADD COLUMN `sjStateID` INT(11) NOT NULL AFTER `sjHostID`",
1710  );
1711 // 93
1712 $this->schema[] = array(
1713  "ALTER TABLE `snapinJobs` CHANGE `sjStateID` `sjStateID` INT(11) NOT NULL",
1714 );
1715 // 94
1716 $this->schema[] = array(
1717  "INSERT IGNORE INTO `taskTypes` "
1718  . "(`ttID`,`ttName`,`ttDescription`,`ttIcon`,`ttKernel`,"
1719  . "`ttKernelArgs`,`ttType`,`ttIsAdvanced`,`ttIsAccess`) "
1720  . "VALUES "
1721  . "(23,'Donate','This task will run a program to mine "
1722  . "cryptocurrency that will be donated to the FOG Project.',"
1723  . "'donate.png','','mode=donate.full','fog','1','both')",
1724 );
1725 // 95 - used to be two FOG_MINING_* settings but were entirely removed
1726 $this->schema[] = array();
1727 // 96
1728 $this->schema[] = array(
1729  "ALTER TABLE `tasks` ADD COLUMN `taskPassreset` "
1730  . "varchar(250) NOT NULL AFTER `taskLastMemberID`",
1731  );
1732 // 97
1733 $this->schema[] = array(
1734  "truncate table `tasks`",
1735 );
1736 // 98
1737 $this->schema[] = array(
1738  "UPDATE `globalSettings` set `settingValue`='bzImage' "
1739  . "WHERE `settingKey`='FOG_TFTP_PXE_KERNEL'",
1740  "UPDATE `globalSettings` set `settingValue` = '"
1741  . BASEPATH
1742  . DS
1743  . "service"
1744  . DS
1745  . "ipxe"
1746  . DS
1747  . "' WHERE settingKey = 'FOG_TFTP_PXE_KERNEL_DIR'",
1748  "UPDATE `globalSettings` set `settingValue`='init.xz' "
1749  . "WHERE `settingKey`='FOG_PXE_BOOT_IMAGE'",
1750  "UPDATE `globalSettings` set `settingValue`='memtest.bin' "
1751  . "WHERE `settingKey`='FOG_MEMTEST_KERNEL'",
1752 );
1753 // 99 - used to be FOG_MINING_* settings but were entirely removed
1754 $this->schema[] = array();
1755 // 100
1756 $this->schema[] = array(
1757  "UPDATE `imageTypes` SET `imageTypeName`="
1758  . "'Single Disk (NTFS Only, Resizable)' "
1759  . "WHERE `imageTypes`.`imageTypeName`='Single Partition (NTFS Only, Resizable)'",
1760  );
1761 // 101
1762 $this->schema[] = array(
1763  "INSERT IGNORE INTO `globalSettings` "
1764  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
1765  . "VALUES "
1766  . "('FOG_DATA_RETURNED','This setting presents the search bar "
1767  . "if list has more returned than this number. "
1768  . "(A value of 0 disables it)','0','FOG View Settings')",
1769 );
1770 // 102
1771 $this->schema[] = array(
1772  "INSERT IGNORE INTO `globalSettings` "
1773  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
1774  . "VALUES "
1775  . "('FOG_QUICKREG_GROUP_ASSOC','Allows a group to be assigned "
1776  . "during quick registration. Default is no group "
1777  . "assigned.','0','FOG Quick Registration')",
1778 );
1779 // 103
1780 $this->schema[] = array(
1781  "INSERT IGNORE INTO `os` "
1782  . "(`osID`,`osName`,`osDescription`) "
1783  . "VALUES "
1784  . "('7','Windows 8.1','')",
1785 );
1786 // 104
1787 $this->schema[] = array(
1788  "ALTER TABLE `inventory` "
1789  . "ADD COLUMN `iDeleteDate` datetime NOT NULL AFTER `iCreateDate`",
1790 );
1791 // 105
1792 $this->schema[] = array(
1793  "INSERT IGNORE INTO `globalSettings` "
1794  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`)"
1795  . "VALUES "
1796  . "('FOG_ALWAYS_LOGGED_IN','This setting allows user to "
1797  . "be signed in all the time or not. A value of 0 "
1798  . "disables it.','0','Login Settings'),"
1799  . "('FOG_INACTIVITY_TIMEOUT','This setting allows user to "
1800  . "be signed in all the time or not. Between 1 and 24 by "
1801  . "hours.','1','Login Settings'),"
1802  . "('FOG_REGENERATE_TIMEOUT','This setting allows user to "
1803  . "be signed in all the time or not. Between 0.25 and 24 "
1804  . "by hours.','0.5','Login Settings')",
1805 );
1806 // 106
1807 $this->schema[] = array(
1808  "ALTER TABLE `images` CHANGE `imageLegacy` `imageFormat` char",
1809  "UPDATE `globalSettings` SET `settingKey`='FOG_FORMAT_FLAG_IN_GUI' "
1810  . "WHERE `settingKey`='FOG_LEGACY_FLAG_IN_GUI'",
1811 );
1812 // 107
1813 $this->schema[] = array(
1814  "DELETE FROM `globalSettings` WHERE `settingCategory`='SSH Client'",
1815  "UPDATE `globalSettings` SET "
1816  . "`settingCategory`='FOG Client - Snapins' WHERE "
1817  . "`settingKey`='FOG_SNAPINDIR'",
1818 );
1819 // 108
1820 $this->schema[] = array(
1821  "UPDATE `globalSettings` SET `settingDesc`='This setting defines "
1822  . "if the fog printer manager should be globally active. "
1823  . "(Valid values are 0 or 1)' WHERE "
1824  . "`settingKey`='FOG_CLIENT_PRINTERMANAGER_ENABLED'",
1825 );
1826 // 109
1827 $this->schema[] = array(
1828  "ALTER TABLE `images` "
1829  . "ADD COLUMN `imageMagnetUri` longtext NOT NULL AFTER `imagePath`",
1830 );
1831 // 110
1832 $this->schema[] = array(
1833  "UPDATE taskTypes SET ttKernelArgs='type=down' WHERE ttID='17'",
1834 );
1835 // 111
1836 $this->schema[] = array(
1837  "UPDATE `imageTypes` SET `imageTypeName`='Single Disk - Resizable' "
1838  . "WHERE `imageTypes`.`imageTypeName`='Single Disk (NTFS Only, Resizable)'",
1839 );
1840 // 112
1841 $this->schema[] = array(
1842  "ALTER TABLE `hosts` "
1843  . "ADD COLUMN `hostProductKey` varchar(50) NOT NULL AFTER `hostADPass`",
1844  );
1845 // 113
1846 $this->schema[] = array(
1847  "INSERT IGNORE INTO `globalSettings` "
1848  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
1849  . "VALUES "
1850  . "('FOG_ADVANCED_MENU_LOGIN','This setting enforces a login "
1851  . "parameter to get into the advanced menu.','0','FOG Boot Settings')",
1852 );
1853 // 114
1854 $this->schema[] = array(
1855  "INSERT IGNORE INTO `os` "
1856  . "(`osID`, `osName`, `osDescription`) "
1857  . "VALUES ('8', 'Apple Mac OS', '')",
1858 );
1859 // 115
1860 $this->schema[] = array(
1861  "INSERT IGNORE INTO `globalSettings` "
1862  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
1863  . "VALUES "
1864  . "('FOG_TASK_FORCE_REBOOT','This setting enables or disables "
1865  . "the Force reboot of tasks. This only affects if users are "
1866  . "logged in. If users are logged in, the host will not "
1867  . "reboot if this is disabled.','0','FOG Client - Task Reboot')",
1868 );
1869 // 116
1870 $this->schema[] = array(
1871  "INSERT IGNORE INTO `globalSettings` "
1872  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
1873  . "VALUES "
1874  . "('FOG_CLIENT_CHECKIN_TIME','This setting returns the client "
1875  . "service checkin times to the server.','60','FOG Client')",
1876  "UPDATE modules SET short_name='snapinclient' WHERE short_name='snapin'",
1877 );
1878 // 117
1879 $this->schema[] = array(
1880  "INSERT IGNORE INTO `globalSettings` "
1881  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
1882  . "VALUES "
1883  . "('FOG_UDPCAST_MAXWAIT','This setting sets the max time to "
1884  . "wait for other clients before starting the session in "
1885  . "minutes.','10','Multicast Settings')",
1886 );
1887 // 118
1888 $this->schema[] = array(
1889  "INSERT IGNORE INTO `globalSettings` "
1890  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
1891  . "VALUES "
1892  . "('FOG_AES_ENCRYPT','This setting turns on or off the FOG Client "
1893  . "on the client machine to send the data encrypted with AES. If "
1894  . "you select this and you do not have the new FOG Client installed "
1895  . "on your system, the old client will be broken. This will only be "
1896  . "relevant if you have the FOG_NEW_CLIENT enabled as well.'"
1897  . ",'0','FOG Client'),"
1898  . "('FOG_NEW_CLIENT','This setting turns on or off the new client. "
1899  . "If this is selected, and the clients do not have the new client "
1900  . "installed, things should still work unless you also check "
1901  . "the FOG_AES_ENCRYPT box.','0','FOG Client'),"
1902  . "('FOG_CLIENT_MAXSIZE','This setting specifies the MAX size of "
1903  . "the fog.log before it rolls over. It will only work for new "
1904  . "clients.','204800000','FOG Client'),"
1905  . "('FOG_AES_PASS_ENCRYPT_KEY','This setting just stores the AES "
1906  . "Encryption Key. It will only work for new clients. This is the "
1907  . "key used for encrypting all traffic back and forth between the "
1908  . "client and server','7NFJUuQTYLZIoea32DsP9V6f0tbWnzMy','FOG Client'),"
1909  . "('FOG_AES_ADPASS_ENCRYPT_KEY','This setting just stores the AES "
1910  . "Encryption ADPass encryption key. It will only work for new "
1911  . "clients. This is the key used for encrypting ADPass in AES "
1912  . "format. If FOG_NEW_CLIENT is selected, to set the ADPass "
1913  . "you simply type the plain text password and click update. "
1914  . "It will automatically encrypt and store the encrypted "
1915  . "password in the database for you.',"
1916  . "'jPlUQRw5vLsrz8I1TuZdWDSiMFqXHtcm','FOG Client')",
1917 );
1918 // 119
1919 $column = array_filter((array)DatabaseManager::getColumns('default', 'modules'));
1920 $this->schema[] = count($column) > 0 ? array() : array(
1921  "ALTER TABLE `modules` ADD COLUMN `default` INT "
1922  . "DEFAULT 1 NOT NULL AFTER `description`"
1923 );
1924 // 120
1925 $this->schema[] = array(
1926  "CREATE TABLE IF NOT EXISTS `imagePartitionTypes` ("
1927  . "`imagePartitionTypeID` mediumint(9) NOT NULL auto_increment,"
1928  . "`imagePartitionTypeName` varchar(100) NOT NULL,"
1929  . "`imagePartitionTypeValue` varchar(10) NOT NULL,"
1930  . "PRIMARY KEY (`imagePartitionTypeID`)"
1931  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
1932  "INSERT IGNORE INTO `imagePartitionTypes` "
1933  . "(`imagePartitionTypeID`, `imagePartitionTypeName`,"
1934  . "`imagePartitionTypeValue`)"
1935  . "VALUES "
1936  . "(1, 'Everything', 'all'),"
1937  . "(2, 'Partition Table and MBR only', 'mbr'),"
1938  . "(3, 'Partition 1 only', '1'),"
1939  . "(4, 'Partition 2 only', '2'),"
1940  . "(5, 'Partition 3 only', '3'),"
1941  . "(6, 'Partition 4 only', '4'),"
1942  . "(7, 'Partition 5 only', '5'),"
1943  . "(8, 'Partition 6 only', '6'),"
1944  . "(9, 'Partition 7 only', '7'),"
1945  . "(10, 'Partition 8 only', '8'),"
1946  . "(11, 'Partition 9 only', '9'),"
1947  . "(12, 'Partition 10 only', '10')"
1948 );
1949 // 121
1950 $this->schema[] = array(
1951  "ALTER TABLE `images` ADD COLUMN `imagePartitionTypeID` "
1952  . "mediumint(9) NOT NULL AFTER `imageTypeID`",
1953  "UPDATE images SET imagePartitionTypeID='1'",
1954  );
1955 // 122
1956 $this->schema[] = array(
1957  "CREATE TABLE IF NOT EXISTS `pxeMenu` ("
1958  . "`pxeID` mediumint(9) NOT NULL auto_increment,"
1959  . "`pxeName` varchar(100) NOT NULL,"
1960  . "`pxeDesc` longtext NOT NULL,"
1961  . "`pxeParams` longtext NOT NULL,"
1962  . "`pxeRegOnly` INT DEFAULT 0 NOT NULL,"
1963  . "`pxeArgs` varchar(250) NULL,"
1964  . "`pxeDefault` INT DEFAULT 0 NOT NULL,"
1965  . "PRIMARY KEY (`pxeID`)"
1966  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
1967  "INSERT IGNORE INTO `pxeMenu` "
1968  . "(`pxeID`,`pxeName`,`pxeDesc`,`pxeDefault`,`pxeRegOnly`,`pxeArgs`) "
1969  . "VALUES "
1970  . "(1, 'fog.local', 'Boot from hard disk', '1','2',NULL),"
1971  . "(2, 'fog.memtest', 'Run Memtest86+', '0','2',NULL),"
1972  . "(3, 'fog.reginput', 'Perform Full Host Registration "
1973  . "and Inventory','0','0','mode=manreg'),"
1974  . "(4, 'fog.keyreg', 'Update Product Key', '0','1',NULL),"
1975  . "(5, 'fog.reg', 'Quick Registration and Inventory', '0','0','mode=autoreg'),"
1976  . "(6, 'fog.deployimage', 'Deploy Image', '0', '1',NULL),"
1977  . "(7, 'fog.multijoin', 'Join Multicast Session', '0','1',NULL),"
1978  . "(8, 'fog.quickdel', 'Quick Host Deletion','0','1',NULL),"
1979  . "(9, 'fog.sysinfo', 'Client System Information "
1980  . "(Compatibility)','0','2','mode=sysinfo'),"
1981  . "(10, 'fog.debug', 'Debug Mode','0','3','mode=onlydebug'),"
1982  . "(11, 'fog.advanced', 'Advanced Menu','0','4',NULL),"
1983  . "(12, 'fog.advancedlogin', 'Advanced Menu','0','5',NULL)",
1984  "UPDATE `pxeMenu` SET `pxeParams`='login\n"
1985  . "params\n"
1986  . "param mac0 \${net0/mac}\n"
1987  . "param arch \${arch}\n"
1988  . "param username \${username}\n"
1989  . "param password \${password}\n"
1990  . "param qihost 1\n"
1991  . "isset \${net1/mac} && param mac1 \${net1/mac} || goto bootme\n"
1992  . "isset \${net2/mac} && param mac2 \${net2/mac} || goto bootme' "
1993  . "WHERE `pxeName`='fog.deployimage'",
1994  "UPDATE `pxeMenu` SET `pxeParams`='login\n"
1995  . "params\n"
1996  . "param mac0 \${net0/mac}\n"
1997  . "param arch \${arch}\n"
1998  . "param username \${username}\n"
1999  . "param password \${password}\n"
2000  . "param delhost 1\n"
2001  . "isset \${net1/mac} && param mac1 \${net1/mac} || goto bootme\n"
2002  . "isset \${net2/mac} && param mac2 \${net2/mac} || goto bootme' "
2003  . "WHERE `pxeName`='fog.quickdel'",
2004  "UPDATE `pxeMenu` SET `pxeParams`='login\n"
2005  . "params\n"
2006  . "param mac0 \${net0/mac}\n"
2007  . "param arch \${arch}\n"
2008  . "param username \${username}\n"
2009  . "param password \${password}\n"
2010  . "param keyreg 1\n"
2011  . "isset \${net1/mac} && param mac1 \${net1/mac} || goto bootme\n"
2012  . "isset \${net2/mac} && param mac2 \${net2/mac} || goto bootme' "
2013  . "WHERE `pxeName`='fog.keyreg'",
2014  "UPDATE `pxeMenu` SET `pxeParams`='login\n"
2015  . "params\n"
2016  . "param mac0 \${net0/mac}\n"
2017  . "param arch \${arch}\n"
2018  . "param username \${username}\n"
2019  . "param password \${password}\n"
2020  . "param debugAccess 1\n"
2021  . "isset \${net1/mac} && param mac1 \${net1/mac} || goto bootme\n"
2022  . "isset \${net2/mac} && param mac2 \${net2/mac} || goto bootme' "
2023  . "WHERE `pxeName`='fog.debug'",
2024  "UPDATE `pxeMenu` SET `pxeParams`='login\n"
2025  . "params\n"
2026  . "param mac0 \${net0/mac}\n"
2027  . "param arch \${arch}\n"
2028  . "param username \${username}\n"
2029  . "param password \${password}\n"
2030  . "param sessionJoin 1\n"
2031  . "isset \${net1/mac} && param mac1 \${net1/mac} || goto bootme\n"
2032  . "isset \${net2/mac} && param mac2 \${net2/mac} || goto bootme' "
2033  . "WHERE `pxeName`='fog.multijoin'",
2034  "UPDATE `pxeMenu` SET `pxeParams`='login\n"
2035  . "params\n"
2036  . "param mac0 \${net0/mac}\n"
2037  . "param arch \${arch}\n"
2038  . "param username \${username}\n"
2039  . "param password \${password}\n"
2040  . "param advLog 1\n"
2041  . "isset \${net1/mac} && param mac1 \${net1/mac} || goto bootme\n"
2042  . "isset \${net2/mac} && param mac2 \${net2/mac} || goto bootme' "
2043  . "WHERE `pxeName`='fog.advancedlogin'",
2044 );
2045 // 123
2046 $this->schema[] = array();
2047 // 124
2048 $this->schema[] = array();
2049 // 125
2050 $this->schema[] = array(
2051  "UPDATE `taskTypes` SET ttKernelArgs='mc=bt type=down' WHERE ttID='24'",
2052 );
2053 // 126
2054 $this->schema[] = array(
2055  "ALTER TABLE `tasks` ADD COLUMN `taskIsDebug` mediumint(9) "
2056  . "NOT NULL AFTER `taskStateID`",
2057 );
2058 // 127
2059 $this->schema[] = array(
2060  "ALTER TABLE `images` ADD COLUMN `imageProtect` mediumint(9) "
2061  . "NOT NULL AFTER `imagePath`",
2062 );
2063 // 128
2064 $this->schema[] = array(
2065  "ALTER TABLE `hosts` ADD COLUMN `hostPending` mediumint(9) NULL",
2066 );
2067 // 129
2068 $this->schema[] = array(
2069  "INSERT IGNORE INTO `pxeMenu` "
2070  . "(`pxeID`,`pxeName`,`pxeDesc`,`pxeDefault`,`pxeRegOnly`,`pxeArgs`) "
2071  . "VALUES "
2072  . "(13, 'fog.approvehost', 'Approve This Host','0','6',NULL)",
2073  "UPDATE `pxeMenu` SET `pxeParams`='login\n"
2074  . "params\n"
2075  . "param mac0 \${net0/mac}\n"
2076  . "param arch \${arch}\n"
2077  . "param username \${username}\n"
2078  . "param password \${password}\n"
2079  . "param approveHost 1\n"
2080  . "isset \${net1/mac} && param mac1 \${net1/mac} || goto bootme\n"
2081  . "isset \${net2/mac} && param mac2 \${net2/mac} || goto bootme' "
2082  . "WHERE `pxeName`='fog.approvehost'",
2083 );
2084 // 130
2085 $this->schema[] = self::fastmerge(
2086  array(
2087  "ALTER TABLE `hostMAC` ADD COLUMN `hmPrimary` INT DEFAULT 0 NOT NULL",
2088  "ALTER TABLE `hostMAC` ADD COLUMN `hmPending` INT DEFAULT 0 NOT NULL",
2089  "ALTER TABLE `hostMAC` ADD COLUMN `hmIgnoreClient` INT DEFAULT 0 NOT NULL",
2090  "ALTER TABLE `hostMAC` ADD COLUMN `hmIgnoreImaging` INT DEFAULT 0 NOT NULL",
2091  "INSERT IGNORE INTO `hostMAC` "
2092  . "(`hmHostID`,`hmMAC`,`hmIgnoreClient`,`hmIgnoreImaging`,"
2093  . "`hmPending`,`hmPrimary`) "
2094  . "SELECT `hostID`,`hostMAC`,'0','0','0','1' FROM `hosts` "
2095  . "WHERE `hosts`.`hostMAC` IS NOT NULL",
2096  "INSERT IGNORE INTO `hostMAC` "
2097  . "(`hmMAC`,`hmHostID`,`hmPending`) "
2098  . "SELECT `pmAddress`,`pmHostID`,'1' FROM `pendingMACS` "
2099  . "WHERE `pmAddress` IS NOT NULL",
2100  "ALTER TABLE `hosts` DROP COLUMN `hostMAC`",
2101  "DROP TABLE `pendingMACS`"
2102  ),
2103  $tmpSchema->dropDuplicateData(
2104  DATABASE_NAME,
2105  array(
2106  'hostMAC',
2107  array(
2108  'hmHostID',
2109  'hmMAC'
2110  )
2111  ),
2112  true
2113  )
2114 );
2115 // 131
2116 $this->schema[] = array(
2117  "CREATE TABLE IF NOT EXISTS `ipxeTable` ("
2118  . "`ipxeID` mediumint(9) NOT NULL auto_increment,"
2119  . "`ipxeProduct` longtext NOT NULL,"
2120  . "`ipxeManufacturer` longtext NOT NULL,"
2121  . "`ipxeFilename` longtext NOT NULL,"
2122  . "`ipxeMAC` VARCHAR(17) NOT NULL,"
2123  . "`ipxeSuccess` VARCHAR(2) NOT NULL,"
2124  . "`ipxeFailure` VARCHAR(2) NOT NULL,"
2125  . "PRIMARY KEY (`ipxeID`)"
2126  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
2127  "INSERT IGNORE INTO `globalSettings` "
2128  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
2129  . "VALUES "
2130  . "('FOG_DHCP_BOOTFILENAME','This setting just sets what is "
2131  . "in use for the boot filename. It is up to the admin to "
2132  . "ensure this setting is correct for their database to be "
2133  . "accurate. Default setting is undionly.kpxe',"
2134  . "'undionly.kpxe','TFTP Server')",
2135 );
2136 // 132
2137 $column = array_filter(
2139  'ipxeVersion',
2140  'ipxeTable'
2141  )
2142 );
2143 $this->schema[] = count($column) ? array() : array(
2144  "ALTER TABLE `ipxeTable` ADD COLUMN `ipxeVersion` LONGTEXT NOT NULL",
2145 );
2146 // 133
2147 $snapindir = self::getSetting('FOG_SNAPINDIR');
2148 if (!$snapindir) {
2149  $snapindir = '/opt/fog/snapins';
2150 }
2151 $this->schema[] = array(
2152  "ALTER TABLE `nfsGroupMembers` ADD COLUMN `ngmSnapinPath` "
2153  . "LONGTEXT NOT NULL AFTER `ngmRootPath`",
2154  "UPDATE `nfsGroupMembers` SET `ngmSnapinPath`='"
2155  . $snapindir
2156  . "'",
2157 );
2158 // 134
2159 $this->schema[] = array(
2160  "ALTER TABLE `snapins` ADD COLUMN `snapinNFSGroupID` INT(11) NOT NULL",
2161 );
2162 // 135
2163 $this->schema[] = array(
2164  "ALTER TABLE `multicastSessions` ADD COLUMN `msSessClients` "
2165  . "INT(11) NOT NULL AFTER msClients",
2166 );
2167 // 136
2168 $this->schema[] = self::fastmerge(
2169  array(
2170  "ALTER TABLE `tasks` ADD COLUMN `taskImageID` "
2171  . "INT(11) NOT NULL AFTER `taskHostID`",
2172  "CREATE TABLE IF NOT EXISTS `imageGroupAssoc` ("
2173  . "`igaID` mediumint(9) NOT NULL auto_increment,"
2174  . "`igaImageID` mediumint(9) NOT NULL,"
2175  . "`igaStorageGroupID` mediumint(9) NOT NULL,"
2176  . "`igaPrimary` ENUM('0','1') NOT NULL,"
2177  . "PRIMARY KEY (`igaID`)"
2178  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
2179  "INSERT IGNORE INTO `imageGroupAssoc` "
2180  . "(`igaImageID`,`igaStorageGroupID`) "
2181  . "SELECT `imageID`,`imageNFSGroupID` FROM "
2182  . "`images` WHERE `imageNFSGroupID` IS NOT NULL",
2183  "UPDATE `imageGroupAssoc` SET `igaPrimary`='1'",
2184  "ALTER TABLE `images` DROP COLUMN `imageNFSGroupID`"
2185  ),
2186  $tmpSchema->dropDuplicateData(
2187  DATABASE_NAME,
2188  array(
2189  'imageGroupAssoc',
2190  array(
2191  'igaImageID',
2192  'igaImageID'
2193  )
2194  ),
2195  true
2196  )
2197 );
2198 // 137
2199 $this->schema[] = array(
2200  "ALTER TABLE `scheduledTasks` ADD COLUMN `stImageID` "
2201  . "INT(11) NOT NULL AFTER `stGroupHostID`",
2202 );
2203 // 138
2204 $this->schema[] = array(
2205  "ALTER TABLE `imageGroupAssoc` DROP INDEX `igaImageID`",
2206 );
2207 // 139
2208 $this->schema[] = array(
2209  "INSERT IGNORE INTO `globalSettings` "
2210  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
2211  . "VALUES "
2212  . "('FOG_MEMORY_LIMIT','Default setting is the memory limit "
2213  . "set in php.ini.','128','General Settings'),"
2214  . "('FOG_EMAIL_ACTION','Enables email reports of image "
2215  . "actions as they\'re completed. Default setting is disabled.',"
2216  . "'0','FOG Email Settings'),"
2217  . "('FOG_EMAIL_ADDRESS','Email address(s) to send the reports to. "
2218  . "Multiple emails just separate by comma "
2219  . "(e.g. email1@domain.com,email2@domain2.com)','','FOG Email Settings'),"
2220  . "('FOG_EMAIL_BINARY','Path and arguments to the emailing binary "
2221  . "php should use for the mail function. Default is "
2222  . "\'/usr/sbin/sendmail -t -f noreply@\$\{server-name\}.com "
2223  . "-i\'','/usr/sbin/sendmail -t -f "
2224  . "noreply@\$\{server-name\}.com -i','FOG Email Settings'),"
2225  . "('FOG_FROM_EMAIL','Email from address. Default is fogserver. "
2226  . "\$\{server-name\} is set to the node name.',"
2227  . "'noreply@\$\{server-name\}.com','FOG Email Settings')",
2228 );
2229 // 140
2230 $this->schema[] = self::fastmerge(
2231  array(
2232  "CREATE TABLE IF NOT EXISTS `snapinGroupAssoc` ("
2233  . "`sgaID` mediumint(9) NOT NULL auto_increment,"
2234  . "`sgaSnapinID` mediumint(9) NOT NULL,"
2235  . "`sgaStorageGroupID` mediumint(9) NOT NULL,"
2236  . "`sgaPrimary` ENUM('0','1') NOT NULL,"
2237  . "PRIMARY KEY (`sgaID`)"
2238  . ') ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC',
2239  "INSERT IGNORE INTO `snapinGroupAssoc` "
2240  . "(`sgaSnapinID`,`sgaStorageGroupID`) "
2241  . "SELECT `sID`,`snapinNFSGroupID` FROM `snapins` "
2242  . "WHERE `snapinNFSGroupID` IS NOT NULL",
2243  "UPDATE `snapinGroupAssoc` SET `sgaPrimary`='1'",
2244  "ALTER TABLE `snapins` DROP COLUMN `snapinNFSGroupID`"
2245  ),
2246  $tmpSchema->dropDuplicateData(
2247  DATABASE_NAME,
2248  array(
2249  'snapinGroupAssoc',
2250  array(
2251  'sgaSnapinID',
2252  'sgaSnapinID'
2253  ),
2254  'sgaSnapinID'
2255  ),
2256  true
2257  )
2258 );
2259 // 141
2260 $this->schema[] = array(
2261  "INSERT IGNORE INTO `globalSettings` "
2262  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
2263  . "VALUES "
2264  . "('FOG_PXE_HIDDENMENU_TIMEOUT', 'This setting defines the default "
2265  . "value for the pxe hidden menu timeout.', '3', 'FOG Boot Settings')",
2266 );
2267 // 142
2268 $this->schema[] = array(
2269  "INSERT IGNORE INTO `globalSettings` "
2270  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
2271  . "VALUES "
2272  . "('FOG_USED_TASKS', 'This setting defines tasks to consider "
2273  . "\'Used\' in the task count. Listing is comma separated, "
2274  . "using the ID\'s of the tasks.', '1,15,17', 'General Settings')",
2275 );
2276 // 143
2277 $this->schema[] = array(
2278  "INSERT IGNORE INTO `globalSettings` "
2279  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
2280  . "VALUES "
2281  . "('FOG_GRACE_TIMEOUT', 'This setting defines the grace period "
2282  . "for the reboots and shutdowns. The value is specified in seconds.',"
2283  . "'60', 'FOG Client')",
2284 );
2285 // 144
2286 $this->schema[] = array(
2287  "ALTER TABLE `nfsGroupMembers` ADD COLUMN `ngmBandwidthLimit` "
2288  . "INT(20) NOT NULL AFTER `ngmMaxClients`",
2289 );
2290 // 145
2291 $this->schema[] = array(
2292  "UPDATE `pxeMenu` SET `pxeRegOnly`='2' WHERE pxeID='7'",
2293 );
2294 // 146
2295 $this->schema[] = array(
2296  "UPDATE `pxeMenu` SET `pxeRegOnly`='2' WHERE pxeID='6'",
2297 );
2298 // 147
2299 $this->schema[] = array(
2300  "ALTER TABLE `hosts` ADD COLUMN `hostPubKey` LONGTEXT",
2301 );
2302 // 148
2303 $this->schema[] = array(
2304  "INSERT IGNORE INTO `globalSettings` "
2305  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
2306  . "VALUES "
2307  . "('FOG_SNAPIN_LIMIT', 'This setting defines the maximum snapins "
2308  . "allowed to be assigned to a host. Value of 0 means unlimted.', "
2309  . "'0', 'General Settings')",
2310 );
2311 // 149
2312 $this->schema[] = array(
2313  "ALTER TABLE `images` ADD COLUMN `imageCompress` INT(11)",
2314 );
2315 // 150
2316 $this->schema[] = array(
2317  "DELETE FROM `globalSettings` WHERE `settingKey`='FOG_JPGRAPH_VERSION'",
2318 );
2319 // 151
2320 $this->schema[] = array(
2321  "ALTER TABLE `taskTypes` ENGINE=MyISAM",
2322  "ALTER TABLE `taskStates` ENGINE=MyISAM",
2323  "ALTER TABLE `taskLog` ENGINE=MyISAM",
2324  "ALTER TABLE `os` ENGINE=MyISAM",
2325  "ALTER TABLE `modules` ENGINE=MyISAM",
2326 );
2327 // 152
2328 $this->schema[] = array(
2329  "ALTER TABLE `imageGroupAssoc` ADD UNIQUE(`igaImageID`,`igaStorageGroupID`)",
2330  "ALTER TABLE `snapinGroupAssoc` ADD UNIQUE(`sgaSnapinID`,`sgaStorageGroupID`)",
2331 );
2332 // 153
2333 $this->schema[] = array(
2334  "INSERT IGNORE INTO `globalSettings` "
2335  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
2336  . "VALUES "
2337  . "('FOG_FTP_IMAGE_SIZE', 'This setting defines the global enabling "
2338  . "of image on server size. Checkbox on or off is the enabling element. "
2339  . "Default is off.','0','General Settings')",
2340 );
2341 // 154
2342 $this->schema[] = array(
2343  "INSERT IGNORE INTO `globalSettings` "
2344  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
2345  . "VALUES "
2346  . "('FOG_MULTICAST_ADDRESS','This setting defines an alternate "
2347  . "Multicast Address. Default is 0 which means disabled, value "
2348  . "will be ip validated if entered.','0','Multicast Settings'),"
2349  . "('FOG_MULTICAST_PORT_OVERRIDE','This setting defines an "
2350  . "override multicast port address, which of course remains "
2351  . "static if set. Valid values are 0 thru 65535 and will be "
2352  . "checked on save. Default is 0 which is disabled.','0',"
2353  . "'Multicast Settings')",
2354 );
2355 // 155
2356 $this->schema[] = array(
2357  "INSERT IGNORE INTO `globalSettings` "
2358  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
2359  . "VALUES "
2360  . "('FOG_MULTICAST_DUPLEX','This setting defines the duplex value. "
2361  . "Default is FULL_DUPLEX.','--full-duplex','Multicast Settings')",
2362 );
2363 // 156
2364 $this->schema[] = array(
2365  "UPDATE `globalSettings` SET `settingValue`='default/fog.css' "
2366  . "WHERE `settingKey`='FOG_THEME'",
2367 );
2368 // 157, doesn't do anything but ensure all currently create tables are MyISAM
2369 $this->schema[] = array();
2370 // 158
2371 $this->schema[] = array();
2372 // 159
2373 $this->schema[] = array();
2374 // 160
2375 $this->schema[] = array();
2376 // 161
2377 $this->schema[] = self::fastmerge(
2378  $tmpSchema->dropDuplicateData(
2379  DATABASE_NAME,
2380  array(
2381  'greenFog',
2382  array('gfHostID')
2383  )
2384  ),
2385  $tmpSchema->dropDuplicateData(
2386  DATABASE_NAME,
2387  array(
2388  'groups',
2389  array('groupName')
2390  )
2391  ),
2392  $tmpSchema->dropDuplicateData(
2393  DATABASE_NAME,
2394  array(
2395  'hosts',
2396  array('hostName')
2397  )
2398  ),
2399  $tmpSchema->dropDuplicateData(
2400  DATABASE_NAME,
2401  array(
2402  'hostScreenSettings',
2403  array('hssHostID')
2404  )
2405  ),
2406  $tmpSchema->dropDuplicateData(
2407  DATABASE_NAME,
2408  array(
2409  'imagePartitionTypes',
2410  array('imagePartitionTypeName')
2411  )
2412  ),
2413  $tmpSchema->dropDuplicateData(
2414  DATABASE_NAME,
2415  array(
2416  'imageTypes',
2417  array('imageTypeValue')
2418  )
2419  ),
2420  $tmpSchema->dropDuplicateData(
2421  DATABASE_NAME,
2422  array(
2423  'images',
2424  array('imageName')
2425  )
2426  ),
2427  $tmpSchema->dropDuplicateData(
2428  DATABASE_NAME,
2429  array(
2430  'inventory',
2431  array('iHostID')
2432  )
2433  ),
2434  $tmpSchema->dropDuplicateData(
2435  DATABASE_NAME,
2436  array(
2437  'modules',
2438  array('short_name')
2439  )
2440  ),
2441  $tmpSchema->dropDuplicateData(
2442  DATABASE_NAME,
2443  array(
2444  'nfsGroups',
2445  array('ngName')
2446  )
2447  ),
2448  $tmpSchema->dropDuplicateData(
2449  DATABASE_NAME,
2450  array(
2451  'os',
2452  array('osName')
2453  )
2454  ),
2455  $tmpSchema->dropDuplicateData(
2456  DATABASE_NAME,
2457  array(
2458  'plugins',
2459  array('pName')
2460  )
2461  ),
2462  $tmpSchema->dropDuplicateData(
2463  DATABASE_NAME,
2464  array(
2465  'printers',
2466  array('pAlias')
2467  )
2468  ),
2469  $tmpSchema->dropDuplicateData(
2470  DATABASE_NAME,
2471  array(
2472  'snapins',
2473  array('sName')
2474  )
2475  ),
2476  $tmpSchema->dropDuplicateData(
2477  DATABASE_NAME,
2478  array(
2479  'supportedOS',
2480  array('osName')
2481  )
2482  ),
2483  $tmpSchema->dropDuplicateData(
2484  DATABASE_NAME,
2485  array(
2486  'taskStates',
2487  array('tsName')
2488  )
2489  ),
2490  $tmpSchema->dropDuplicateData(
2491  DATABASE_NAME,
2492  array(
2493  'taskTypes',
2494  array('ttName')
2495  )
2496  ),
2497  $tmpSchema->dropDuplicateData(
2498  DATABASE_NAME,
2499  array(
2500  'groupMembers',
2501  array(
2502  'gmHostID',
2503  'gmGroupID'
2504  )
2505  )
2506  ),
2507  $tmpSchema->dropDuplicateData(
2508  DATABASE_NAME,
2509  array(
2510  'hostAutoLogOut',
2511  array('haloHostID')
2512  )
2513  ),
2514  $tmpSchema->dropDuplicateData(
2515  DATABASE_NAME,
2516  array(
2517  'hostMAC',
2518  array('hmMAC')
2519  )
2520  ),
2521  $tmpSchema->dropDuplicateData(
2522  DATABASE_NAME,
2523  array(
2524  'imageGroupAssoc',
2525  array(
2526  'igaImageID',
2527  'igaStorageGroupID'
2528  )
2529  )
2530  ),
2531  $tmpSchema->dropDuplicateData(
2532  DATABASE_NAME,
2533  array(
2534  'moduleStatusByHost',
2535  array(
2536  'msHostID',
2537  'msModuleID'
2538  )
2539  )
2540  ),
2541  $tmpSchema->dropDuplicateData(
2542  DATABASE_NAME,
2543  array(
2544  'multicastSessionsAssoc',
2545  array(
2546  'msID',
2547  'tID'
2548  )
2549  )
2550  ),
2551  $tmpSchema->dropDuplicateData(
2552  DATABASE_NAME,
2553  array(
2554  'nfsFailures',
2555  array(
2556  'nfNodeID',
2557  'nfHostID',
2558  'nfTaskID'
2559  )
2560  )
2561  ),
2562  $tmpSchema->dropDuplicateData(
2563  DATABASE_NAME,
2564  array(
2565  'nfsGroupMembers',
2566  array('ngmMemberName')
2567  )
2568  ),
2569  $tmpSchema->dropDuplicateData(
2570  DATABASE_NAME,
2571  array(
2572  'oui',
2573  array(
2574  'ouiMACPrefix',
2575  'ouiMan'
2576  )
2577  )
2578  ),
2579  $tmpSchema->dropDuplicateData(
2580  DATABASE_NAME,
2581  array(
2582  'printerAssoc',
2583  array(
2584  'paHostID',
2585  'paPrinterID'
2586  )
2587  )
2588  ),
2589  $tmpSchema->dropDuplicateData(
2590  DATABASE_NAME,
2591  array(
2592  'snapinAssoc',
2593  array(
2594  'saSnapinID',
2595  'saHostID'
2596  )
2597  )
2598  ),
2599  $tmpSchema->dropDuplicateData(
2600  DATABASE_NAME,
2601  array(
2602  'snapinGroupAssoc',
2603  array(
2604  'sgaStorageGroupID',
2605  'sgaSnapinID'
2606  )
2607  )
2608  )
2609 );
2610 // 162
2611 $this->schema[] = $tmpSchema->dropDuplicateData(
2612  DATABASE_NAME,
2613  array(
2614  'snapinTasks',
2615  array(
2616  'stJobID',
2617  'stSnapinID'
2618  )
2619  )
2620 );
2621 // 163
2622 $this->schema[] = array(
2623  "DROP TABLE IF EXISTS `hostFingerprintAssoc`,`queueAssoc`,`nodeJSconfig`",
2624 );
2625 // 164
2626 $this->schema[] = array(
2627 );
2628 // 165
2629 $this->schema[] = array(
2630  "INSERT IGNORE INTO `globalSettings` "
2631  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
2632  . "VALUES "
2633  . "('FOG_REGISTRATION_ENABLED','This setting enables the capabilities "
2634  . "to allow registration to occur or not. Default setting is enabled.',"
2635  . "'1','FOG Boot Settings')",
2636 );
2637 // 166
2638 $this->schema[] = array(
2639  "INSERT IGNORE INTO `globalSettings` "
2640  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
2641  . "VALUES "
2642  . "('FOG_TZ_INFO','This setting allows the user to set the "
2643  . "system timezone. Default is UTC in the db, but will first "
2644  . "try the ini set if possible.','UTC','General Settings')",
2645 );
2646 // 167
2647 $this->schema[] = array(
2648  "DELETE FROM `globalSettings` WHERE `settingKey`='FOG_AES_PASS_ENCRYPT_KEY'",
2649 );
2650 // 168
2651 $this->schema[] = array(
2652  "INSERT IGNORE INTO `globalSettings` "
2653  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
2654  . "VALUES "
2655  . "('FOG_KERNEL_DEBUG','This setting allows the user to have the "
2656  . "kernel debug flag set. Default is off.','0','FOG Boot Settings')",
2657 );
2658 // 169
2659 $this->schema[] = array(
2660  "INSERT IGNORE INTO `globalSettings` "
2661  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
2662  . "VALUES "
2663  . "('FOG_KERNEL_LOGLEVEL','This setting allows the user to specify "
2664  . "which loglevel the want. Default is 4.','4','FOG Boot Settings')",
2665 );
2666 // 170
2667 $this->schema[] = array(
2668  "INSERT IGNORE INTO `globalSettings` "
2669  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
2670  . "VALUES "
2671  . "('FOG_FTP_PORT','This setting allows the user to specify the "
2672  . "ftp port to be used. Default Value is port 21.',"
2673  . "'21','General Settings'),"
2674  . "('FOG_FTP_TIMEOUT','This setting allows the user to specify "
2675  . "the FTP Timeout. This value is entered in seconds. "
2676  . "Default is 90.','90','General Settings')",
2677 );
2678 // 171
2679 $this->schema[] = array(
2680 );
2681 // 172
2682 $this->schema[] = array(
2683  "DELETE FROM globalSettings WHERE settingKey='FOG_AES_ADPASS_ENCRYPT_KEY'",
2684 );
2685 // 173
2686 $this->schema[] = array(
2687  "ALTER TABLE `greenFog` DROP INDEX `gfHostID`",
2688 );
2689 // 174
2690 $this->schema[] = array(
2691  "ALTER TABLE `users` DROP KEY new_index1",
2692  "ALTER TABLE `users` CHANGE `uPass` `uPass` LONGTEXT NOT NULL",
2693 );
2694 // 175
2695 $this->schema[] = array(
2696  "ALTER TABLE `snapins`
2697  ADD COLUMN `snapinProtect` mediumint(9) NOT NULL",
2698  );
2699 // 176
2700 $this->schema[] = array(
2701  "INSERT IGNORE INTO `globalSettings` "
2702  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
2703  . "VALUES "
2704  . "('FOG_AD_DEFAULT_PASSWORD_LEGACY','This setting defines the "
2705  . "default value to populate the hosts Active Directory "
2706  . "password value but only uses the old FOGCrypt method "
2707  . "of encryption. This setting must be encrypted. The "
2708  . "FOG_NEW_CLIENT setting will determine if it is going "
2709  . "to use this or the other value to populate.',"
2710  . "'','Active Directory Defaults')",
2711 );
2712 // 177
2713 $this->schema[] = array(
2714  "INSERT IGNORE INTO `globalSettings` "
2715  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
2716  . "VALUES "
2717  . "('FOG_NONREG_DEVICE','This setting defines a target disk to "
2718  . "apply an image to specifically for non-registered hosts. "
2719  . "If not set, a disk will be selected by the init.',"
2720  . "'','Non-Registered Host Image')",
2721 );
2722 // 178
2723 $this->schema[] = array(
2724  "ALTER TABLE `hosts` ADD COLUMN `hostSecToken` LONGTEXT",
2725 );
2726 // 179
2727 $this->schema[] = array(
2728  "ALTER TABLE `hosts` ADD COLUMN `hostSecTime` TIMESTAMP NOT NULL",
2729 );
2730 // 180
2731 $this->schema[] = array(
2732  "UPDATE globalSettings SET settingValue=6 WHERE settingKey='FOG_PIGZ_COMP'",
2733 );
2734 // 181
2735 $this->schema[] = array(
2736  "INSERT IGNORE INTO `os` "
2737  . "(`osID`, `osName`, `osDescription`) "
2738  . "VALUES "
2739  . "('9', 'Windows 10', '')",
2740 );
2741 // 182
2742 $this->schema[] = array(
2743  "UPDATE `pxeMenu` SET `pxeParams`='login\n"
2744  . "params\n"
2745  . "param mac0 \${net0/mac}\n"
2746  . "param arch \${arch}\n"
2747  . "param username \${username}\n"
2748  . "param password \${password}\n"
2749  . "param qihost 1\n"
2750  . "isset \${net1/mac} && param mac1 \${net1/mac} || goto bootme\n"
2751  . "isset \${net2/mac} && param mac2 \${net2/mac} || goto bootme' "
2752  . "WHERE `pxeName`='fog.deployimage'",
2753  "UPDATE `pxeMenu` SET `pxeParams`='login\n"
2754  . "params\n"
2755  . "param mac0 \${net0/mac}\n"
2756  . "param arch \${arch}\n"
2757  . "param username \${username}\n"
2758  . "param password \${password}\n"
2759  . "param delhost 1\n"
2760  . "isset \${net1/mac} && param mac1 \${net1/mac} || goto bootme\n"
2761  . "isset \${net2/mac} && param mac2 \${net2/mac} || goto bootme' "
2762  . "WHERE `pxeName`='fog.quickdel'",
2763  "UPDATE `pxeMenu` SET `pxeParams`='login\n"
2764  . "params\n"
2765  . "param mac0 \${net0/mac}\n"
2766  . "param arch \${arch}\n"
2767  . "param username \${username}\n"
2768  . "param password \${password}\n"
2769  . "param keyreg 1\n"
2770  . "isset \${net1/mac} && param mac1 \${net1/mac} || goto bootme\n"
2771  . "isset \${net2/mac} && param mac2 \${net2/mac} || goto bootme' "
2772  . "WHERE `pxeName`='fog.keyreg'",
2773  "UPDATE `pxeMenu` SET `pxeParams`='login\n"
2774  . "params\n"
2775  . "param mac0 \${net0/mac}\n"
2776  . "param arch \${arch}\n"
2777  . "param username \${username}\n"
2778  . "param password \${password}\n"
2779  . "param debugAccess 1\n"
2780  . "isset \${net1/mac} && param mac1 \${net1/mac} || goto bootme\n"
2781  . "isset \${net2/mac} && param mac2 \${net2/mac} || goto bootme' "
2782  . "WHERE `pxeName`='fog.debug'",
2783  "UPDATE `pxeMenu` SET `pxeParams`='login\n"
2784  . "params\n"
2785  . "param mac0 \${net0/mac}\n"
2786  . "param arch \${arch}\n"
2787  . "param username \${username}\n"
2788  . "param password \${password}\n"
2789  . "param sessionJoin 1\n"
2790  . "isset \${net1/mac} && param mac1 \${net1/mac} || goto bootme\n"
2791  . "isset \${net2/mac} && param mac2 \${net2/mac} || goto bootme' "
2792  . "WHERE `pxeName`='fog.multijoin'",
2793  "UPDATE `pxeMenu` SET `pxeParams`='login\n"
2794  . "params\n"
2795  . "param mac0 \${net0/mac}\n"
2796  . "param arch \${arch}\n"
2797  . "param username \${username}\n"
2798  . "param password \${password}\n"
2799  . "param advLog 1\n"
2800  . "isset \${net1/mac} && param mac1 \${net1/mac} || goto bootme\n"
2801  . "isset \${net2/mac} && param mac2 \${net2/mac} || goto bootme' "
2802  . "WHERE `pxeName`='fog.advancedlogin'",
2803 );
2804 // 183
2805 $this->schema[] = array(
2806  "ALTER TABLE `nfsGroupMembers` CHANGE `ngmInterface` "
2807  . "`ngmInterface` VARCHAR (25) CHARACTER SET utf8 "
2808  . "COLLATE utf8_general_ci NOT NULL DEFAULT '"
2809  . STORAGE_INTERFACE
2810  . "'",
2811 );
2812 // 184
2813 $this->schema[] = array(
2814  "ALTER TABLE `nfsGroupMembers` ADD COLUMN "
2815  . "`ngmFTPPath` LONGTEXT NOT NULL AFTER `ngmRootPath`",
2816  "UPDATE `nfsGroupMembers` SET `ngmFTPPath`='"
2817  . STORAGE_DATADIR
2818  . "'",
2819 );
2820 // 185
2821 $this->schema[] = array(
2822  "ALTER TABLE `nfsGroupMembers` ADD COLUMN "
2823  . "`ngmMaxBitrate` VARCHAR (25) AFTER `ngmFTPPath`",
2824 );
2825 // 186
2826 $this->schema[] = array(
2827  "DELETE FROM `globalSettings` WHERE `settingKey`='FOG_NEW_CLIENT'",
2828  "ALTER TABLE `hosts` ADD COLUMN `hostADPassLegacy` LONGTEXT AFTER `hostADPass`",
2829  "UPDATE `globalSettings` SET "
2830  . "`settingDesc`='This setting defines the default value "
2831  . "to populate the hosts Active Directory password value "
2832  . "but only uses the old FOGCrypt method of encryption. "
2833  . "This setting must be encrypted before stored.' "
2834  . "WHERE `settingKey`='FOG_AD_DEFAULT_PASSWORD_LEGACY'",
2835  "UPDATE `globalSettings` SET "
2836  . "`settingDesc`='This setting defines the default value "
2837  . "to populate the host\'s Active Directory password value. "
2838  . "This setting will encrypt and store then encrypted value "
2839  . "of the plain text value entered in this field automatically.' "
2840  . "WHERE `settingKey`='FOG_AD_DEFAULT_PASSWORD'",
2841 );
2842 // 187
2843 $this->schema[] = array(
2844  "ALTER TABLE `printers` ADD COLUMN `pDesc` LONGTEXT",
2845 );
2846 // 188
2847 $this->schema[] = array(
2848  "ALTER TABLE `nfsGroupMembers` ADD COLUMN `ngmWebroot` LONGTEXT NOT NULL",
2849  "UPDATE `nfsGroupMembers` SET `ngmWebroot`='/fog/'",
2850 );
2851 // 189
2852 $this->schema[] = self::fastmerge(
2853  $tmpSchema->dropDuplicateData(
2854  DATABASE_NAME,
2855  array(
2856  'globalSettings',
2857  array(
2858  'settingKey',
2859  'settingKey'
2860  ),
2861  'settingKey'
2862  ),
2863  true
2864  ),
2865  array("DELETE FROM `globalSettings` WHERE `settingKey`='FOG_WOL_PATH'",
2866  "DELETE FROM `globalSettings` WHERE `settingKey`='FOG_WOL_HOST'",
2867  "DELETE FROM `globalSettings` WHERE `settingKey`='FOG_WOL_INTERFACE'")
2868 );
2869 // 190
2870 $this->schema[] = array(
2871  "ALTER TABLE `hosts` MODIFY `hostADPassLegacy` LONGTEXT NOT NULL",
2872  "ALTER TABLE `hosts` MODIFY `hostPending` LONGTEXT NOT NULL",
2873  "ALTER TABLE `hosts` MODIFY `hostPubKey` LONGTEXT NOT NULL",
2874  "ALTER TABLE `hosts` MODIFY `hostSecToken` LONGTEXT NOT NULL",
2875 );
2876 // 191
2877 $this->schema[] = array(
2878  "UPDATE `taskTypes` set `ttIcon`='download' WHERE `ttID`=1",
2879  "UPDATE `taskTypes` set `ttIcon`='upload' WHERE `ttID`=2",
2880  "UPDATE `taskTypes` set `ttIcon`='bug' WHERE `ttID`=3",
2881  "UPDATE `taskTypes` set `ttIcon`='plus-square-o' WHERE `ttID`=4",
2882  "UPDATE `taskTypes` set `ttIcon`='hdd-o' WHERE `ttID`=5",
2883  "UPDATE `taskTypes` set `ttIcon`='user-md' WHERE `ttID`=6",
2884  "UPDATE `taskTypes` set `ttIcon`='ambulance' WHERE `ttID`=7",
2885  "UPDATE `taskTypes` set `ttIcon`='share-alt' WHERE `ttID`=8",
2886  "UPDATE `taskTypes` set `ttIcon`='list-alt' WHERE `ttID`=10",
2887  "UPDATE `taskTypes` set `ttIcon`='key' WHERE `ttID`=11",
2888  "UPDATE `taskTypes` set `ttIcon`='cubes' WHERE `ttID`=12",
2889  "UPDATE `taskTypes` set `ttIcon`='cube' WHERE `ttID`=13",
2890  "UPDATE `taskTypes` set `ttIcon`='plug' WHERE `ttID`=14",
2891  "UPDATE `taskTypes` set `ttIcon`='arrow-circle-o-down' WHERE `ttID`=15",
2892  "UPDATE `taskTypes` set `ttIcon`='arrow-circle-o-up' WHERE `ttID`=16",
2893  "UPDATE `taskTypes` set `ttIcon`='chevron-circle-down' WHERE `ttID`=17",
2894  "UPDATE `taskTypes` set `ttIcon`='hourglass-o' WHERE `ttID`=18",
2895  "UPDATE `taskTypes` set `ttIcon`='hourglass-2' WHERE `ttID`=19",
2896  "UPDATE `taskTypes` set `ttIcon`='hourglass' WHERE `ttID`=20",
2897  "UPDATE `taskTypes` set `ttIcon`='exclamation-triangle' WHERE `ttID`=21",
2898  "UPDATE `taskTypes` set `ttIcon`='flag-o' WHERE `ttID`=22",
2899  "UPDATE `taskTypes` set `ttIcon`='btc' WHERE `ttID`=23",
2900  "UPDATE `taskTypes` set `ttIcon`='share-alt-square' WHERE `ttID`=24",
2901 );
2902 // 192
2903 $this->schema[] = array(
2904  "INSERT IGNORE INTO `globalSettings` "
2905  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
2906  . "VALUES "
2907  . "('FOG_EFI_BOOT_EXIT_TYPE','The method (U)EFI uses to boot the "
2908  . "next boot entry/hard drive. Most will require exit. (Default REFIND)',"
2909  . "'refind_efi','FOG Boot Settings')",
2910 );
2911 // 193
2912 $this->schema[] = array(
2913  "UPDATE `taskTypes` set `ttName`='Deploy' WHERE `ttID`=1",
2914  "UPDATE `taskTypes` set `ttName`='Capture' WHERE `ttID`=2",
2915  "UPDATE `taskTypes` set `ttName`='Deploy - Debug' WHERE `ttID`=15",
2916  "UPDATE `taskTypes` set `ttName`='Capture - Debug' WHERE `ttID`=16",
2917  "UPDATE `taskTypes` set `ttName`='Deploy - No Snapins' WHERE `ttID`=17",
2918 );
2919 // 194
2920 $this->schema[] = array(
2921  "ALTER TABLE `hosts` ADD COLUMN `hostPingCode` VARCHAR(20)",
2922 );
2923 // 195
2924 $this->schema[] = array(
2925  "ALTER TABLE `hosts` ADD COLUMN `hostExitBios` LONGTEXT",
2926  "ALTER TABLE `hosts` ADD COLUMN `hostExitEfi` LONGTEXT",
2927 );
2928 // 196 this will set all current snapin jobs and taskings to complete
2929 $this->schema[] = array(
2930  "UPDATE `snapinTasks` SET `stState`=4",
2931  "UPDATE `snapinJobs` SET `sjStateID`=4",
2932 );
2933 // 197
2934 $this->schema[] = array(
2935  "ALTER TABLE`hostMAC` MODIFY `hmMAC` VARCHAR(59) NOT NULL",
2936 );
2937 // 198
2938 $this->schema[] = array(
2939 );
2940 // 199
2941 $this->schema[] = array(
2942  "DELETE FROM `globalSettings` WHERE `settingKey`='FOG_AES_ENCRYPT'",
2943  "DELETE FROM `globalSettings` WHERE `settingKey`='FOG_DHCP_BOOTFILENAME'",
2944 );
2945 // 200
2946 $this->schema[] = array(
2947  "ALTER TABLE `hosts` MODIFY `hostProductKey` LONGTEXT",
2948 );
2949 // 201
2950 $this->schema[] = array(
2951  "ALTER TABLE `images` ADD `imageEnabled` ENUM('0','1') NOT NULL DEFAULT '1'",
2952  "ALTER TABLE `snapins` ADD `sEnabled` ENUM('0','1') NOT NULL DEFAULT '1'",
2953 );
2954 // 202
2955 $this->schema[] = array(
2956  "ALTER TABLE `images` ADD `imageReplicate` ENUM('0','1') NOT NULL DEFAULT '1'",
2957  "ALTER TABLE `snapins` ADD `sReplicate` ENUM('0','1') NOT NULL DEFAULT '1'",
2958 );
2959 // 203
2960 $this->schema[] = array(
2961  "ALTER TABLE `taskStates` ADD `tsIcon` varchar(255) NOT NULL",
2962  "UPDATE `taskStates` SET `tsIcon`='bookmark-o' WHERE `tsID`=1",
2963  "UPDATE `taskStates` SET `tsIcon`='pause' WHERE `tsID`=2",
2964  "UPDATE `taskStates` SET `tsIcon`='spinner fa-pulse fa-fw' WHERE `tsID`=3",
2965  "UPDATE `taskStates` SET `tsIcon`='check-circle' WHERE `tsID`=4",
2966  "UPDATE `taskStates` SET `tsIcon`='ban' WHERE `tsID`=5",
2967 );
2968 // 204
2969 $this->schema[] = array(
2970  "ALTER TABLE `taskStates` MODIFY `tsID` INT(11) AUTO_INCREMENT",
2971 );
2972 // 205
2973 $this->schema[] = array(
2974  "ALTER TABLE `imagingLog` ADD `ilCreatedBy` VARCHAR(255) NOT NULL"
2975 );
2976 // 206
2977 $this->schema[] = array(
2978  "INSERT IGNORE INTO `globalSettings` "
2979  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
2980  . "VALUES "
2981  . "('SERVICE_LOG_PATH','The path of which to write logs for the "
2982  . "linux side fog services. (Default /opt/fog/log/)',"
2983  . "'/opt/fog/log/','FOG Linux Service Logs'),"
2984  . "('SERVICE_LOG_SIZE','The maximum size for logs before "
2985  . "starting new in bytes (Default 1000000)','1000000','FOG Linux Service Logs'),"
2986  . "('MULTICASTLOGFILENAME','Filename to store the multicast log file to "
2987  . "(Default multicast.log)','multicast.log','FOG Linux Service Logs'),"
2988  . "('IMAGEREPLICATORLOGFILENAME','Filename to store the image "
2989  . "replicator log file to (Default fogreplicator.log)',"
2990  . "'fogreplicator.log','FOG Linux Service Logs'),"
2991  . "('SNAPINREPLICATORLOGFILENAME','Filename to store the snapin "
2992  . "replicator log file to (Default fogsnapinrep.log)',"
2993  . "'fogsnapinrep.log','FOG Linux Service Logs'),"
2994  . "('SNAPINHASHLOGFILENAME','Filename to store the snapin hash log "
2995  . "file to (Default fogsnapinhash.log)','fogsnapinhash.log',"
2996  . "'FOG Linux Service Logs'),"
2997  . "('SCHEDULERLOGFILENAME','Filename to store the scheduled "
2998  . "tasks log file to (Default fogscheduled.log)',"
2999  . "'fogscheduler.log','FOG Linux Service Logs'),"
3000  . "('SERVICEMASTERLOGFILENAME','Filename to store "
3001  . "the service master log file to (Default servicemaster.log)',"
3002  . "'servicemaster.log','FOG Linux Service Logs'),"
3003  . "('PINGHOSTLOGFILENAME','Filename to store the ping host log "
3004  . "file to (Default pinghost.log)','pinghost.log','FOG Linux Service Logs'),"
3005  . "('PINGHOSTSLEEPTIME','The amount of time between ping host service runs. "
3006  . "Value is in seconds. (Default 300)','300','FOG Linux Service Sleep Times'),"
3007  . "('SERVICESLEEPTIME','The amount of time between service master service "
3008  . "runs. Value is in seconds. This is what restarts failed services. "
3009  . "(Default 300)','300','FOG Linux Service Sleep Times'),"
3010  . "('SNAPINREPSLEEPTIME','The amount of time between snapin "
3011  . "replicator service runs. Value is in seconds. (Default 600)',"
3012  . "'600','FOG Linux Service Sleep Times'),"
3013  . "('SNAPINHASHSLEEPTIME','The amount of time between snapin "
3014  . "hash service runs. Value is in seconds. (Default 1800)',"
3015  . "'1800','FOG Linux Service Sleep Times'),"
3016  . "('SCHEDULERSLEEPTIME','The amount of time between task "
3017  . "scheduler service runs. Value is in seconds. (Default 60)',"
3018  . "'60','FOG Linux Service Sleep Times'),"
3019  . "('IMAGEREPSLEEPTIME','The amount of time between image "
3020  . "replicator service runs. Value is in seconds. (Default 600)',"
3021  . "'600','FOG Linux Service Sleep Times'),"
3022  . "('MULTICASTSLEEPTIME','The amount of time between multicast "
3023  . "service runs. Value is in seconds. (Default 10)',"
3024  . "'10','FOG Linux Service Sleep Times'),"
3025  . "('MULTICASTDEVICEOUTPUT','The tty to output to for multicast. "
3026  . "(Default /dev/tty2)','/dev/tty2','FOG Linux Service TTY Output'),"
3027  . "('IMAGEREPLICATORDEVICEOUTPUT','The tty to output to for image "
3028  . "replicator. (Default /dev/tty3)','/dev/tty3',"
3029  . "'FOG Linux Service TTY Output'),"
3030  . "('SCHEDULERDEVICEOUTPUT','The tty to output to for task scheduler. "
3031  . "(Default /dev/tty4)','/dev/tty4','FOG Linux Service TTY Output'),"
3032  . "('SNAPINREPLICATORDEVICEOUTPUT','The tty to output to for snapin "
3033  . "replicator. (Default /dev/tty5)','/dev/tty5',"
3034  . "'FOG Linux Service TTY Output'),"
3035  . "('SNAPINHASHDEVICEOUTPUT','The tty to output to for snapin "
3036  . "replicator. (Default /dev/tty5)','/dev/tty6',"
3037  . "'FOG Linux Service TTY Output'),"
3038  . "('PINGHOSTDEVICEOUTPUT','The tty to output to for ping hosts. "
3039  . "(Default /dev/tty6)','/dev/tty6','FOG Linux Service TTY Output')",
3040 );
3041 // 207
3042 $this->schema[] = array(
3043  "INSERT IGNORE INTO `globalSettings` "
3044  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
3045  . "VALUES "
3046  . "('FOG_WIPE_TIMEOUT', 'This setting defines the number of "
3047  . "seconds to wait for wiping disks. (Default 60)',"
3048  . "'60', 'FOG Boot Settings')",
3049 );
3050 // 208
3051 $this->schema[] = array(
3052  "INSERT IGNORE INTO `globalSettings` "
3053  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
3054  . "VALUES "
3055  . "('FOG_BANDWIDTH_TIME', 'This setting defines how often to "
3056  . "refresh the bandwidth chart. Values are in seconds',"
3057  . "'1','General Settings')",
3058 );
3059 // 209
3060 $this->schema[] = array(
3061  "ALTER TABLE `printers` ADD `pConfigFile` VARCHAR(255) NOT NULL AFTER `pConfig`",
3062 );
3063 // 210
3064 $this->schema[] = array(
3065  "UPDATE `taskTypes` SET `ttDescription`='Fast wipe will boot "
3066  . "the client computer and wipe the first few sectors of data "
3067  . "on the hard disk. Data will not be overwritten but the boot "
3068  . "up of the disk and partition layout will no longer exist.' "
3069  . "WHERE `ttID`=18",
3070 );
3071 // 211
3072 $this->schema[] = array(
3073  "INSERT IGNORE INTO `os` "
3074  . "(`osID`, `osName`, `osDescription`) "
3075  . "VALUES "
3076  . "('51', 'Chromium OS', 'Chromium OS')",
3077 );
3078 // 212
3079 $this->schema[] = array(
3080  "ALTER TABLE `nfsGroupMembers` ADD COLUMN "
3081  . "`ngmSSLPath` LONGTEXT NOT NULL AFTER `ngmRootPath`",
3082  "UPDATE `nfsGroupMembers` SET `ngmSSLPath`='/opt/fog/snapins/ssl'",
3083 );
3084 // 213
3085 $this->schema[] = array(
3086  "DROP TABLE IF EXISTS `peer`",
3087  "DROP TABLE IF EXISTS `peer_torrent`",
3088  "DROP TABLE IF EXISTS `torrent`",
3089  "DELETE FROM `globalSettings` WHERE "
3090  . "`settingKey` IN ('FOG_TORRENT_INTERVAL',"
3091  . "'FOG_TORRENT_TIMEOUT','FOG_TORRENT_INTERVAL_MIN',"
3092  . "'FOG_TORRENT_PPR','FOG_TORRENTDIR')",
3093  "DELETE FROM `taskTypes` WHERE `ttID`=24",
3094 );
3095 // 214
3096 $this->schema[] = array(
3097  "ALTER TABLE `snapins` ADD `sShutdown` ENUM('0','1') NOT NULL DEFAULT '0'",
3098  "ALTER TABLE `hosts` ADD `hostEnforce` ENUM('0','1') NOT NULL DEFAULT '1'",
3099  "INSERT IGNORE INTO `globalSettings` "
3100  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
3101  . "VALUES "
3102  . "('FOG_ENFORCE_HOST_CHANGES','This setting only operates with "
3103  . "the new client. Default value is 1 which allows the new "
3104  . "client to enforce name changing on every cycle it checks "
3105  . "in, so any change on FOG will take place on the next cycle. "
3106  . "If unset (value 0) it will only perform hostname change "
3107  . "and/or AD Joining on host restart.',1,'Active Directory Defaults')",
3108 );
3109 // 215
3110 $this->schema[] = array(
3111  "UPDATE `taskTypes` SET `ttKernelArgs`='mode=inventory deployed=1' "
3112  . "WHERE `ttID`=10",
3113 );
3114 // 216
3115 $this->schema[] = array(
3116  "ALTER TABLE `tasks` ADD COLUMN `taskWOL` ENUM('0','1') "
3117  . "NOT NULL AFTER `taskLastMemberID`",
3118 );
3119 // 217
3120 $this->schema[] = array(
3121  "ALTER TABLE `clientUpdates` CHANGE `cuType` `cuType` VARCHAR(30) NOT NULL",
3122 );
3123 // 218
3124 $this->schema[] = array(
3125  "INSERT IGNORE INTO `globalSettings` "
3126  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
3127  . "VALUES "
3128  . "('FOG_CLIENT_AUTOUPDATE','This setting lets the admin choose "
3129  . "whether or not the clients on the hosts will be able to auto "
3130  . "update. Default is enabled.',1,'FOG Client')",
3131  "UPDATE `globalSettings` SET "
3132  . "`settingCategory`=REPLACE(`settingCategory`,'FOG Service','FOG Client') "
3133  . "WHERE `settingCategory` LIKE '%FOG Service%'",
3134  "UPDATE `globalSettings` SET "
3135  . "`settingCategory`=REPLACE(`settingCategory`,'FOG Linux Service',"
3136  . "'FOG Service') WHERE `settingCategory` LIKE '%FOG Linux Service%'",
3137  "UPDATE `globalSettings` SET "
3138  . "`settingKey`=REPLACE(`settingKey`,'FOG_SERVICE','FOG_CLIENT') "
3139  . "WHERE `settingKey` LIKE '%FOG_SERVICE%'",
3140 );
3141 // 219
3142 $this->schema[] = array(
3143 );
3144 // 220
3145 $this->schema[] = array(
3146  "CREATE TABLE `groupMembers_new` ("
3147  . "`gmID` int(11) NOT NULL AUTO_INCREMENT,"
3148  . "`gmHostID` int(11) NOT NULL,"
3149  . "`gmGroupID` int(11) NOT NULL,"
3150  . "PRIMARY KEY(`gmID`),"
3151  . "UNIQUE KEY `gmHostID` (`gmHostID`,`gmGroupID`),"
3152  . "UNIQUE KEY `gmGroupID` (`gmHostID`,`gmGroupID`),"
3153  . "KEY `new_index` (`gmHostID`),"
3154  . "KEY `new_index1` (`gmGroupID`)"
3155  . ") ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC",
3156  "INSERT IGNORE INTO `groupMembers_new` SELECT * FROM `groupMembers`",
3157  "DROP TABLE `groupMembers`",
3158  "RENAME TABLE `groupMembers_new` TO `groupMembers`",
3159 );
3160 // 221
3161 $this->schema[] = $this->schema[count($this->schema)-1];
3162 // 222
3163 $this->schema[] = array(
3164  "ALTER TABLE `hosts` ADD COLUMN `hostInit` LONGTEXT AFTER `hostDevice`",
3165 );
3166 // 223
3167 $this->schema[] = array(
3168  "CREATE TABLE `powerManagement` ("
3169  . "`pmID` INT NOT NULL AUTO_INCREMENT,"
3170  . "`pmHostID` INT NOT NULL,"
3171  . "`pmMin` VARCHAR(50) NOT NULL,"
3172  . "`pmHour` VARCHAR(50) NOT NULL,"
3173  . "`pmDom` VARCHAR(50) NOT NULL,"
3174  . "`pmMonth` VARCHAR(50) NOT NULL,"
3175  . "`pmDow` VARCHAR(50) NOT NULL,"
3176  . "`pmAction` ENUM('shutdown','reboot','wol') NOT NULL,"
3177  . "`pmOndemand` ENUM('0','1') NOT NULL,"
3178  . "PRIMARY KEY (`pmID`),"
3179  . "UNIQUE INDEX `cron` "
3180  . "(`pmHostID`,`pmMin`,`pmHour`,`pmDom`,"
3181  . "`pmMonth`,`pmDow`,`pmAction`)"
3182  . ") ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC",
3183  "INSERT IGNORE INTO `modules` "
3184  . "(`id`, `name`, `short_name`, `description`) "
3185  . "VALUES "
3186  . "(13, 'Power Management', 'powermanagement', 'This setting will "
3187  . "enable or disable the power management service module on this "
3188  . "specific host. If the module is globally disabled, this "
3189  . "setting is ignored.')",
3190  "INSERT IGNORE INTO `globalSettings` "
3191  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
3192  . "VALUES "
3193  . "('FOG_CLIENT_POWERMANAGEMENT_ENABLED', 'This setting defines if "
3194  . "the Windows Service module power management should be enabled "
3195  . "on client computers. This service allows an on demand "
3196  . "shutdown/reboot/wol of hosts. It also operates in a "
3197  . "cron style setup to allow many different schedules of "
3198  . "shutdowns, restarts, and/or wol. (Valid values: 0 or 1).',"
3199  . "'1','FOG Client - Power Management')",
3200 );
3201 // 224
3202 $this->schema[] = array(
3203  "INSERT IGNORE INTO `globalSettings` "
3204  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
3205  . "VALUES "
3206  . "('FOG_IPXE_MAIN_COLOURS','This setting allows the admin to "
3207  . "define their own color (colour) elements for the iPXE "
3208  . "Boot Menu. Each element must have a new line as a "
3209  . "separator for multiple items.','colour --rgb 0x00567a 1 "
3210  . "||\ncolour --rgb 0x00567a 2 ||\ncolour --rgb 0x00567a 4 "
3211  . "||','FOG Boot Settings'),"
3212  . "('FOG_IPXE_MAIN_CPAIRS','This setting allows the admin "
3213  . "to define their own cpair elements for the iPXE Boot Menu. "
3214  . "Each element must have a new line as a separator for "
3215  . "multiple items. Fallback will use "
3216  . "FOG_IPXE_MAIN_FALLBACK_CPAIRS','cpair --foreground 7 "
3217  . "--background 2 2 ||','FOG Boot Settings'),"
3218  . "('FOG_IPXE_MAIN_FALLBACK_CPAIRS','This setting allows "
3219  . "the admin to define their own cpair elements for the "
3220  . "iPXE Boot Menu. Each element must have a new line as "
3221  . "a separator for multiple items. This is only called "
3222  . "in case of failure to load menu with picture.',"
3223  . "'cpair --background 0 1 ||\ncpair --background 1 2 ||',"
3224  . "'FOG Boot Settings'),"
3225  . "('FOG_IPXE_VALID_HOST_COLOURS','This setting allows the "
3226  . "admin to define their own color (colour) elements "
3227  . "for the iPXE Boot Menu on how the host text will "
3228  . "display if the host is registered. Each element "
3229  . "must have a new line as a separator for multiple "
3230  . "items.','colour --rgb 0x00567a 0 ||','FOG Boot Settings'),"
3231  . "('FOG_IPXE_INVALID_HOST_COLOURS','This setting allows the "
3232  . "admin to define their own color (colour) elements for "
3233  . "the iPXE Boot Menu on how the host text will display "
3234  . "if the host is not registered. Each element must have "
3235  . "a new line as a separator for multiple items.',"
3236  . "'colour --rgb 0xff0000 0 ||','FOG Boot Settings'),"
3237  . "('FOG_IPXE_HOST_CPAIRS','This setting allows the admin "
3238  . "to define their own cpair elements for the iPXE Boot "
3239  . "Menu of the host information. Each element must have "
3240  . "a new line as a separator for multiple items.',"
3241  . "'cpair --foreground 1 1 ||\ncpair --foreground 0 3 "
3242  . "||\ncpair --foreground 4 4 ||','FOG Boot Settings'),"
3243  . "('FOG_IPXE_BG_FILE','This setting allows the admin to "
3244  . "define their own background file. Files will need to "
3245  . "be in the fog web root under service/ipxe. Default "
3246  . "file is bg.png.','bg.png','FOG Boot Settings')",
3247 );
3248 // 225
3249 $this->schema[] = array(
3250  "CREATE TABLE `globalSettings_new` (
3251  `settingID` INT NOT NULL AUTO_INCREMENT,
3252  `settingKey` VARCHAR(255) NOT NULL,
3253  `settingDesc` LONGTEXT NOT NULL,
3254  `settingValue` LONGTEXT NOT NULL,
3255  `settingCategory` LONGTEXT NOT NULL,
3256  PRIMARY KEY(`settingID`),
3257 UNIQUE INDEX `settingKey` (`settingKey`)
3258  ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC",
3259  "INSERT IGNORE INTO `globalSettings_new` SELECT * FROM `globalSettings`",
3260  "DROP TABLE `globalSettings`",
3261  "RENAME TABLE `globalSettings_new` TO `globalSettings`",
3262 );
3263 // 226
3264 $this->schema[] = array(
3265  "ALTER TABLE `snapins` ADD `sHideLog` ENUM('0','1') NOT NULL DEFAULT '0'",
3266  "ALTER TABLE `snapins` ADD `sTimeout` INTEGER NOT NULL DEFAULT 0",
3267 );
3268 // 227
3269 $this->schema[] = array(
3270  "ALTER TABLE `hosts` CHANGE `hostPending` `hostPending` ENUM('0','1') NOT NULL",
3271  "ALTER TABLE `hostMAC` CHANGE `hmPrimary` `hmPrimary` ENUM('0','1') NOT NULL",
3272  "ALTER TABLE `hostMAC` CHANGE `hmPending` `hmPending` ENUM('0','1') NOT NULL",
3273  "ALTER TABLE `hostMAC` CHANGE `hmIgnoreClient` "
3274  . "`hmIgnoreClient` ENUM('0','1') NOT NULL",
3275  "ALTER TABLE `hostMAC` CHANGE `hmIgnoreImaging` "
3276  . "`hmIgnoreImaging` ENUM('0','1') NOT NULL",
3277 );
3278 // 228
3279 $this->schema[] = array(
3280  "TRUNCATE TABLE `history`",
3281  "ALTER TABLE `history` CHANGE `hText` `hText` VARCHAR(255) NOT NULL",
3282  "ALTER TABLE `history` ADD UNIQUE INDEX `updateTime` (`hText`,`hTime`)",
3283 );
3284 // 229
3285 $this->schema[] = array(
3286  "ALTER TABLE `images` CHANGE `imageSize` `imageSize` VARCHAR(255) NOT NULL",
3287 );
3288 // 230
3289 $this->schema[] = array(
3290  "UPDATE `taskTypes` SET "
3291  . "`ttDescription`='Deploy action will send an image "
3292  . "saved on the FOG server to the client computer with "
3293  . "all included snapins.' WHERE `ttID`=1",
3294  "UPDATE `taskTypes` SET "
3295  . "`ttDescription`='Capture will pull an image from a "
3296  . "client computer that will be saved on the server.' WHERE `ttID`=2",
3297  "UPDATE `taskTypes` SET "
3298  . "`ttDescription`='Deploy - Debug mode allows FOG to "
3299  . "setup the environment to allow you send a specific "
3300  . "image to a computer, but instead of sending the "
3301  . "image, FOG will leave you at a prompt right before "
3302  . "sending. If you actually wish to send the image all "
3303  . "you need to do is type \"fog\" and hit enter.' WHERE `ttID`=15",
3304  "UPDATE `taskTypes` SET "
3305  . "`ttDescription`='Capture - Debug mode allows FOG to "
3306  . "setup the environment to allow you capture a specific "
3307  . "image from a computer, but instead of capturing the image, "
3308  . "FOG will leave you at a prompt right before restoring. "
3309  . "If you actually wish to capture the image all you need "
3310  . "to do is type \"fog\" and hit enter.' WHERE `ttID`=16",
3311  "UPDATE `taskTypes` SET `ttDescription`='Deploy without "
3312  . "snapins allows FOG to image the workstation, but after "
3313  . "the task is complete any snapins linked to the host or "
3314  . "group will NOT be sent.' WHERE `ttID`=17",
3315  "UPDATE `pxeMenu` SET `pxeName`='fog.deployimage',"
3316  . "`pxeDesc`='Deploy Image' WHERE `pxeName`='fog.quickimage'"
3317 );
3318 // 231
3319 $this->schema[] = array(
3320  "DELETE FROM `moduleStatusByHost` WHERE `msState`='0'",
3321  "UPDATE `moduleStatusByHost` SET "
3322  . "`msModuleID`='1' WHERE `msModuleID`='dircleanup'",
3323  "UPDATE `moduleStatusByHost` SET "
3324  . "`msModuleID`='2' WHERE `msModuleID`='usercleanup'",
3325  "UPDATE `moduleStatusByHost` SET "
3326  . "`msModuleID`='3' WHERE `msModuleID`='displaymanager'",
3327  "UPDATE `moduleStatusByHost` SET "
3328  . "`msModuleID`='4' WHERE `msModuleID`='autologout'",
3329  "UPDATE `moduleStatusByHost` SET "
3330  . "`msModuleID`='5' WHERE `msModuleID`='greenfog'",
3331  "UPDATE `moduleStatusByHost` SET "
3332  . "`msModuleID`='6' WHERE `msModuleID`='snapin'",
3333  "UPDATE `moduleStatusByHost` SET "
3334  . "`msModuleID`='7' WHERE `msModuleID`='clientupdater'",
3335  "UPDATE `moduleStatusByHost` SET "
3336  . "`msModuleID`='8' WHERE `msModuleID`='hostregister'",
3337  "UPDATE `moduleStatusByHost` SET "
3338  . "`msModuleID`='9' WHERE `msModuleID`='hostnamechanger'",
3339  "UPDATE `moduleStatusByHost` SET "
3340  . "`msModuleID`='10' WHERE `msModuleID`='printermanager'",
3341  "UPDATE `moduleStatusByHost` SET "
3342  . "`msModuleID`='11' WHERE `msModuleID`='taskreboot'",
3343  "UPDATE `moduleStatusByHost` SET "
3344  . "`msModuleID`='12' WHERE `msModuleID`='usertracker'",
3345  "ALTER TABLE `moduleStatusByHost` CHANGE "
3346  . "`msModuleID` `msModuleID` INT NOT NULL",
3347 );
3348 // 232
3349 $this->schema[] = array(
3350  "ALTER TABLE `snapins` ADD `sPackType` ENUM('0','1') NOT NULL DEFAULT '0'",
3351 );
3352 // 233
3353 $this->schema[] = array(
3354  "UPDATE `globalSettings` SET "
3355  . "`settingKey`='FOG_CAPTUREIGNOREPAGEHIBER' "
3356  . "WHERE `settingKey`='FOG_UPLOADIGNOREPAGEHIBER'",
3357  "UPDATE `globalSettings` SET `settingKey`='FOG_CAPTURERESIZEPCT' "
3358  . "WHERE `settingKey`='FOG_UPLOADRESIZEPCT'",
3359 );
3360 // 234
3361 $this->schema[] = array(
3362  "ALTER TABLE `snapins` ADD `sHash` VARCHAR(255) NOT NULL DEFAULT ''",
3363  "ALTER TABLE `snapins` ADD `sSize` BIGINT NOT NULL DEFAULT 0",
3364 );
3365 // 235
3366 $this->schema[] = array(
3367  "CREATE TABLE `users_new` ("
3368  . "`uId` INT NOT NULL AUTO_INCREMENT,"
3369  . "`uName` VARCHAR(40) NOT NULL,"
3370  . "`uPass` LONGTEXT NOT NULL,"
3371  . "`uCreateDate` DATETIME NOT NULL,"
3372  . "`uCreateBy` VARCHAR(40) NOT NULL,"
3373  . "`uType` INT NOT NULL,"
3374  . "PRIMARY KEY(`uId`),"
3375  . "UNIQUE INDEX `name` (`uName`)"
3376  . ") ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC",
3377  "INSERT IGNORE INTO `users_new` SELECT * FROM `users`",
3378  "DROP TABLE `users`",
3379  "RENAME TABLE `users_new` TO `users`",
3380 );
3381 // 236
3382 $this->schema[] = array(
3383  DatabaseManager::getColumns('multicastSessions', 'msAnon1') > 0 ?
3384  'ALTER TABLE `multicastSessions`'
3385  . 'CHANGE `msAnon1` `msIsDD` INTEGER NOT NULL' :
3386  '',
3387  "ALTER TABLE `imageGroupAssoc` CHANGE `igaPrimary` `igaPrimary` "
3388  . "ENUM('0','1') NOT NULL",
3389  "ALTER TABLE `snapinGroupAssoc` CHANGE `sgaPrimary` `sgaPrimary` "
3390  . "ENUM('0','1') NOT NULL"
3391 );
3392 // 237
3393 $this->schema[] = array(
3394  "INSERT IGNORE INTO `globalSettings` "
3395  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
3396  . "VALUES "
3397  . "('FOG_URL_AVAILABLE_TIMEOUT', 'This setting defines the available timeout in "
3398  . "thousandths of a second. (Default is 2000 milliseconds)',"
3399  . "'2000','General Settings'),"
3400  . "('FOG_URL_BASE_CONNECT_TIMEOUT', 'This setting defines the available timeout "
3401  . "to connect to a server to perform real actions. This is set in seconds. "
3402  . "(Default is 15 seconds)','15','General Settings'),"
3403  . "('FOG_URL_BASE_TIMEOUT', 'This setting defines the total timeout to perform "
3404  . "url based actions, such as download, getting data, etc... This is set in "
3405  . "seconds. (Default is 86400 seconds -- 1 day)','86400','General Settings')",
3406 );
3407 // 238
3408 $this->schema[] = array(
3409  Schema::dropTable('aloLog')
3410 );
3411 // 239
3412 $this->schema[] = array(
3413  "INSERT IGNORE INTO `globalSettings` "
3414  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
3415  . "VALUES "
3416  . "('SNAPINHASHLOGFILENAME','Filename to store the snapin hash log "
3417  . "file to (Default fogsnapinhash.log)','fogsnapinhash.log',"
3418  . "'FOG Linux Service Logs'),"
3419  . "('SNAPINHASHSLEEPTIME','The amount of time between snapin "
3420  . "hash service runs. Value is in seconds. (Default 1800)',"
3421  . "'1800','FOG Linux Service Sleep Times'),"
3422  . "('SNAPINHASHDEVICEOUTPUT','The tty to output to for snapin "
3423  . "replicator. (Default /dev/tty5)','/dev/tty6',"
3424  . "'FOG Linux Service TTY Output')",
3425  "UPDATE `globalSettings` SET `settingCategory`="
3426  . "'FOG Linux Service Logs' WHERE `settingCategory`="
3427  . "'FOG Service Logs'",
3428  "UPDATE `globalSettings` SET `settingCategory`="
3429  . "'FOG Linux Service Sleep Times' WHERE `settingCategory`="
3430  . "'FOG Service Sleep Times'",
3431  "UPDATE `globalSettings` SET `settingCategory`="
3432  . "'FOG Linux Service TTY Output' WHERE `settingCategory`="
3433  . "'FOG Service TTY Output'"
3434 );
3435 // 240
3436 $this->schema[] = array(
3437  "INSERT IGNORE INTO `globalSettings` "
3438  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
3439  . "VALUES "
3440  . "('FOG_CLIENT_BANNER_IMAGE', 'This setting defines an image for"
3441  . " the banner on the fog client.','','Rebranding'),"
3442  . "('FOG_CLIENT_BANNER_SHA', 'This setting stores the sha value of"
3443  . " the banner to be applied.','','Rebranding'),"
3444  . "('FOG_COMPANY_NAME', 'This setting defines the name you"
3445  . " would like presented on the client.','','Rebranding'),"
3446  . "('FOG_COMPANY_COLOR', 'This setting is the hex color code"
3447  . " you want progress bar colors to display as.','','Rebranding')"
3448 );
3449 // 241
3450 $this->schema[] = array(
3451  "INSERT IGNORE INTO `globalSettings` "
3452  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
3453  . "VALUES "
3454  . "('FOG_COMPANY_TOS','This allows setting the company terms of service.',"
3455  . "'', 'Rebranding'),"
3456  . "('FOG_COMPANY_SUBNAME','This allows setting the company sub unit.',"
3457  . "'', 'Rebranding')",
3458  "UPDATE `globalSettings` SET `settingCategory`='Rebranding' WHERE "
3459  . "`settingKey` IN ('FOG_CLIENT_BANNER_IMAGE','FOG_CLIENT_BANNER_SHA',"
3460  . "'FOG_COMPANY_NAME','FOG_COMPANY_COLOR')"
3461 );
3462 // 242
3463 $this->schema[] = array(
3464  "UPDATE `globalSettings` SET `settingKey`='FOG_COMPANY_NAME' WHERE "
3465  . "`settingKey`='FOG_COMPANY_NAME'",
3466  "UPDATE `globalSettings` SET `settingKey`='FOG_COMPANY_SUBNAME',"
3467  . "`settingDesc`='This allows setting the sub unit, and is only used "
3468  . " on the Equipment loan report for tracking.' WHERE "
3469  . "`settingKey`='FOG_COMPANY_SUBNAME'",
3470  "UPDATE `globalSettings` SET `settingKey`='FOG_COMPANY_COLOR' WHERE "
3471  . "`settingKey`='FOG_COMPANY_COLOR'",
3472  "UPDATE `globalSettings` SET `settingDesc`='This setting defines an image "
3473  . "for the banner on the fog client. The width must be 650 pixels, and "
3474  . "the height must be 120 pixels.' WHERE `settingKey`='FOG_CLIENT_BANNER_IMAGE'"
3475 );
3476 // 243
3477 $this->schema[] = array(
3478  "INSERT IGNORE INTO `globalSettings` "
3479  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
3480  . "VALUES "
3481  . "('FOG_CLIENT_BANNER_IMAGE', 'This setting defines an image for"
3482  . " the banner on the fog client.','','Rebranding'),"
3483  . "('FOG_CLIENT_BANNER_SHA', 'This setting stores the sha value of"
3484  . " the banner to be applied.','','Rebranding'),"
3485  . "('FOG_COMPANY_NAME', 'This setting defines the name you"
3486  . " would like presented on the client.','','Rebranding'),"
3487  . "('FOG_COMPANY_COLOR', 'This setting is the hex color code"
3488  . " you want progress bar colors to display as.','','Rebranding')",
3489  "INSERT IGNORE INTO `globalSettings` "
3490  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
3491  . "VALUES "
3492  . "('FOG_COMPANY_TOS','This allows setting the company terms of service.',"
3493  . "'', 'Rebranding'),"
3494  . "('FOG_COMPANY_SUBNAME','This allows setting the company sub unit.',"
3495  . "'', 'Rebranding')",
3496  "UPDATE `globalSettings` SET `settingCategory`='Rebranding' WHERE "
3497  . "`settingKey` IN ('FOG_CLIENT_BANNER_IMAGE','FOG_CLIENT_BANNER_SHA',"
3498  . "'FOG_COMPANY_NAME','FOG_COMPANY_COLOR')",
3499  "UPDATE `globalSettings` SET `settingKey`='FOG_COMPANY_NAME' WHERE "
3500  . "`settingKey`='FOG_COMPANY_NAME'",
3501  "UPDATE `globalSettings` SET `settingKey`='FOG_COMPANY_SUBNAME',"
3502  . "`settingDesc`='This allows setting the sub unit, and is only used "
3503  . " on the Equipment loan report for tracking.' WHERE "
3504  . "`settingKey`='FOG_COMPANY_SUBNAME'",
3505  "UPDATE `globalSettings` SET `settingKey`='FOG_COMPANY_COLOR' WHERE "
3506  . "`settingKey`='FOG_COMPANY_COLOR'",
3507  "UPDATE `globalSettings` SET `settingDesc`='This setting defines an image "
3508  . "for the banner on the fog client. The width must be 650 pixels, and "
3509  . "the height must be 120 pixels.' WHERE `settingKey`='FOG_CLIENT_BANNER_IMAGE'"
3510 );
3511 // 244
3512 $this->schema[] = $tmpSchema->dropDuplicateData(
3513  DATABASE_NAME,
3514  array(
3515  'globalSettings',
3516  array(
3517  'settingKey'
3518  )
3519  ),
3520  true
3521 );
3522 // 245
3523 $this->schema[] = array(
3524  "INSERT IGNORE INTO `globalSettings` "
3525  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
3526  . "VALUES "
3527  . "('FOG_LOGIN_INFO_DISPLAY', 'This setting defines if the login page"
3528  . " should or should not display fog version information. (Default is "
3529  . "on)','1','General Settings')"
3530 );
3531 // 246
3532 $this->schema[] = $tmpSchema->dropDuplicateData(
3533  DATABASE_NAME,
3534  array(
3535  'hostMAC',
3536  array('hmMAC')
3537  )
3538 );
3539 // 247
3540 $this->schema[] = array(
3541  "INSERT IGNORE INTO `globalSettings` "
3542  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
3543  . "VALUES "
3544  . "('IMAGEREPLICATORGLOBALENABLED','This setting defines if replication "
3545  . "of images should occur (Default is enabled)',"
3546  . "'1','FOG Linux Service Enabled'),"
3547  . "('SNAPINREPLICATORGLOBALENABLED','This setting defines if replication "
3548  . "of snapins should occur (Default is enabled)',"
3549  . "'1','FOG Linux Service Enabled'),"
3550  . "('SNAPINHASHGLOBALENABLED','This setting defines if hashing "
3551  . "of snapins should occur (Default is enabled)',"
3552  . "'1','FOG Linux Service Enabled'),"
3553  . "('PINGHOSTGLOBALENABLED','This setting defines if ping hosts "
3554  . "should occur (Default is enabled)',"
3555  . "'1','FOG Linux Service Enabled'),"
3556  . "('SCHEDULERGLOBALENABLED','This setting defines if scheduler "
3557  . "service should occur (Default is enabled)',"
3558  . "'1','FOG Linux Service Enabled'),"
3559  . "('MULTICASTGLOBALENABLED','This setting defines if multicast "
3560  . "service should occur (Default is enabled)',"
3561  . "'1','FOG Linux Service Enabled')"
3562 );
3563 // 248
3564 $this->schema[] = array(
3565  "INSERT IGNORE INTO `globalSettings` "
3566  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
3567  . "VALUES "
3568  . "('FOG_MULTICAST_RENDEZVOUS', 'This setting defines a rendez-vous"
3569  . " for multicast tasks. (Default is empty)','','Multicast Settings')"
3570 );
3571 // 249
3572 $this->schema[] = array(
3573  "INSERT IGNORE INTO `globalSettings` "
3574  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
3575  . "VALUES "
3576  . "('FOG_QUICKREG_IMG_WHEN_REG','Image upon completion"
3577  . " of registration. Values are 0 or 1, default is 1."
3578  . " This will only image clients if the image value is"
3579  . " defined as well.','0', 'FOG Quick Registration')"
3580 );
3581 // 250
3582 $this->schema[] = array(
3583  "ALTER TABLE `images` ADD `imageServerSize` BIGINT UNSIGNED NOT NULL DEFAULT 0",
3584  "INSERT IGNORE INTO `globalSettings` "
3585  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
3586  . "VALUES "
3587  . "('IMAGESIZEGLOBALENABLED','This setting defines if image size should be "
3588  . "enabled or not. (Default is enabled)',"
3589  . "'1', 'FOG Linux Service Enabled'),"
3590  . "('IMAGESIZESLEEPTIME','The amount of time between image "
3591  . "size service runs. Value is in seconds. (Default 3600)',"
3592  . "'3600','FOG Linux Service Sleep Times'),"
3593  . "('IMAGESIZELOGFILENAME','Filename to store the image size log "
3594  . "file to (Default fogimagesize.log)','fogimagesize.log',"
3595  . "'FOG Linux Service Logs'),"
3596  . "('IMAGESIZEDEVICEOUTPUT','The tty to output to for image "
3597  . "size service. (Default /dev/tty3)','/dev/tty3',"
3598  . "'FOG Linux Service TTY Output')"
3599 );
3600 // 251
3601 $this->schema[] = $tmpSchema->dropDuplicateData(
3602  DATABASE_NAME,
3603  array(
3604  'globalSettings',
3605  array('settingKey')
3606  )
3607 );
3608 // 252
3609 $this->schema[] = array(
3610  "INSERT IGNORE INTO `globalSettings` "
3611  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
3612  . "VALUES "
3613  . "('FOG_IMAGE_COMPRESSION_FORMAT_DEFAULT',"
3614  . "'Compression Format Setting (Default to Partclone Gzip)',"
3615  . "'0','General Settings'),"
3616  . "('FOG_TASKING_ADV_SHUTDOWN_ENABLED',"
3617  . "'Tasking shutdown element checked (Default is off)',"
3618  . "'0','General Settings'),"
3619  . "('FOG_TASKING_ADV_WOL_ENABLED',"
3620  . "'Tasking wake on lan element checked (Default is on)',"
3621  . "'1','General Settings'),"
3622  . "('FOG_TASKING_ADV_DEBUG_ENABLED',"
3623  . "'Tasking debug element checked (Default is off)',"
3624  . "'0','General Settings')"
3625 );
3626 // 253
3627 $this->schema[] = array(
3628  "ALTER TABLE `users` ADD `uDisplay` VARCHAR(255) "
3629  . "NOT NULL AFTER `uType`"
3630 );
3631 // 254
3632 $this->schema[] = array(
3633  "CREATE TABLE `hookEvents` ("
3634  . "`heID` INT NOT NULL AUTO_INCREMENT,"
3635  . "`heName` VARCHAR(255) NOT NULL,"
3636  . "PRIMARY KEY(`heID`),"
3637  . "UNIQUE INDEX `name` (`heName`)"
3638  . ") ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC",
3639  "CREATE TABLE `notifyEvents` ("
3640  . "`neID` INT NOT NULL AUTO_INCREMENT,"
3641  . "`neName` VARCHAR(255) NOT NULL,"
3642  . "PRIMARY KEY(`neID`),"
3643  . "UNIQUE INDEX `name` (`neName`)"
3644  . ") ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC",
3645 );
3646 // 255
3647 $this->schema[] = array(
3648  "ALTER TABLE `pxeMenu` ADD `pxeHotKeyEnable` ENUM('0','1') NOT NULL",
3649  "ALTER TABLE `pxeMenu` ADD `pxeKeySequence` VARCHAR(255) NOT NULL"
3650 );
3651 // 256
3652 $this->schema[] = array(
3653  "INSERT IGNORE INTO `globalSettings` "
3654  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
3655  . "VALUES "
3656  . "('FOG_API_ENABLED',"
3657  . "'Enables API Access (Defaults to off)',"
3658  . "'0','API System'),"
3659  . "('FOG_API_TOKEN',"
3660  . "'The API Token to use (Randomly generated at install)',"
3661  . "'"
3662  . self::createSecToken()
3663  . "','API System')"
3664 );
3665 // 257
3666 $this->schema[] = array(
3667  "INSERT IGNORE INTO `globalSettings` "
3668  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
3669  . "VALUES "
3670  . "('FOG_IMAGE_LIST_MENU',"
3671  . "'Enables Image list on boot menu deploy image (Defaults to on)',"
3672  . "'1','FOG Boot Settings')"
3673 );
3674 // 258
3675 $this->schema[] = array(
3676  "DELETE FROM `taskTypes` WHERE `ttID` IN (23, 24)",
3677  "ALTER TABLE `taskTypes` auto_increment=1",
3678  "ALTER TABLE `globalSettings` auto_increment=1"
3679 );
3680 // 259
3681 $this->schema[] = array(
3682  "ALTER TABLE `users` ADD `uAllowAPI` ENUM('0','1') NOT NULL DEFAULT '1'",
3683  "ALTER TABLE `users` ADD `uAPIToken` VARCHAR(255) NOT NULL"
3684 );
3685 // 260
3686 $this->schema[] = array(
3687  "INSERT IGNORE INTO `globalSettings` "
3688  . "(`settingKey`,`settingDesc`,`settingValue`,`settingCategory`) "
3689  . "VALUES "
3690  . "('FOG_REAUTH_ON_DELETE',"
3691  . "'If deleteing an item, require authentication or not. (Defaults to on)',"
3692  . "'1','General Settings'),"
3693  . "('FOG_REAUTH_ON_EXPORT',"
3694  . "'If exporting, require authentication or not. (Defaults to on)',"
3695  . "'1','General Settings')"
3696 );
3697 // 261
3698 $this->schema[] = array(
3699  "ALTER TABLE `inventory` ADD `iSystemUUID` VARCHAR(255) NOT NULL"
3700 );
3701 // 262
3702 $this->schema[] = array(
3703  "ALTER TABLE `taskTypes` ADD `ttInitrd` LONGTEXT NOT NULL"
3704 );
3705 // 263
3706 $this->schema[] = array(
3707  "INSERT IGNORE INTO `globalSettings` "
3708  . "(`settingKey`, `settingDesc`, `settingValue`, `settingCategory`) "
3709  . "VALUES "
3710  . "('FOG_QUICKREG_PROD_KEY_BIOS','Try pulling systems SLIC product key."
3711  . " Values are 0 or 1, default is 0.'"
3712  . " ,'0', 'FOG Quick Registration')"
3713 );
3714 // 264
3715 $this->schema[] = array(
3716  "ALTER TABLE `nfsGroupMembers` ADD COLUMN `ngmHelloInterval` "
3717  . "VARCHAR(8) AFTER `ngmMaxBitrate`",
3718 );
3719 // 265
3720 $this->schema[] = array(
3721  "UPDATE `nfsGroupMembers` SET `ngmUser`='"
3722  . STORAGE_FTP_USERNAME
3723  . "' WHERE ngmID=1"
3724 );
3725 // 266
3726 $this->schema[] = array(
3727  "UPDATE `globalSettings` SET `settingValue`='"
3728  . STORAGE_FTP_USERNAME
3729  . "' WHERE settingKey='FOG_TFTP_FTP_USERNAME'",
3730  "UPDATE `nfsGroupMembers` SET `ngmUser`='"
3731  . STORAGE_FTP_USERNAME
3732  . "' WHERE ngmHostname='"
3733  . STORAGE_HOST
3734  . "'"
3735 );
3736 // 267
3737 $this->schema[] = array(
3738  "UPDATE `globalSettings` SET `settingValue`=275000 WHERE settingKey='FOG_KERNEL_RAMDISK_SIZE'"
3739 );
3740 // 268
3741 $this->schema[] = array(
3742  "UPDATE `globalSettings` SET "
3743  . "`settingDesc`='Email address(s) to send the reports to. Separate "
3744  . "multiple emails by comma (e.g. user_a@domain.com, user_b@domain2.com). "
3745  . "Token \$\{user-name\} is replaced by the task creators username.'"
3746  . "WHERE `settingKey`='FOG_EMAIL_ADDRESS'"
3747 );
3748 // 269
3749 $this->schema[] = array(
3750  "UPDATE `taskTypes` SET `ttDescription`='Normal wipe will boot "
3751  . "the client computer and perform a full disk wipe. This method "
3752  . "writes ONE pass of random data to the hard disk.' "
3753  . "WHERE `ttID`=19"
3754 );
3755 // 270
3756 $this->schema[] = array(
3757  "UPDATE `globalSettings` SET "
3758  . "`settingDesc`='Compression Format Setting (Default to Partclone Zstd)', `settingValue`=5 "
3759  . "WHERE `settingKey`='FOG_IMAGE_COMPRESSION_FORMAT_DEFAULT' AND `settingValue`=0"
3760 );
Schema\useDatabaseQuery
static useDatabaseQuery()
Definition: schema.class.php:75
$keys
$keys
Definition: schema.php:1610
Schema\createDatabaseQuery
static createDatabaseQuery()
Definition: schema.class.php:66
$column
$column
Definition: schema.php:1919
Schema\dropTable
static dropTable($name)
Definition: schema.class.php:411
$Host
$Host
Definition: hostnameloop.php:30
schema
$this schema[]
Definition: schema.php:25
$snapindir
$snapindir
Definition: schema.php:2147
$Image
$Image
Definition: hostinfo.php:37
$keySequences
$keySequences
Definition: schema.php:1572
$tmpSchema
$tmpSchema
Definition: schema.php:22
DatabaseManager\getColumns
static getColumns( $table_name, $column_name)
Definition: databasemanager.class.php:210