SELECT 'assignment' as 'processing table...';
ALTER TABLE assignment MODIFY COLUMN `uq` char(255) FIRST;
ALTER TABLE assignment MODIFY COLUMN `name` char(255) AFTER `uq`;
ALTER TABLE assignment MODIFY COLUMN `used` int(11) AFTER `name`;
ALTER TABLE assignment MODIFY COLUMN `jobid` int(11) AFTER `used`;
ALTER TABLE assignment MODIFY COLUMN `subid` int(11) AFTER `jobid`;
ALTER TABLE assignment MODIFY COLUMN `macaddress` char(17) AFTER `subid`;
ALTER TABLE assignment MODIFY COLUMN `lastupdate` int(11) AFTER `macaddress`;
SELECT 'badsubjob' as 'processing table...';
ALTER TABLE badsubjob MODIFY COLUMN `pid` int(11) FIRST;
ALTER TABLE badsubjob MODIFY COLUMN `id` int(11) AFTER `pid`;
ALTER TABLE badsubjob MODIFY COLUMN `count` int(11) AFTER `id`;
ALTER TABLE badsubjob MODIFY COLUMN `retry` int(11) AFTER `count`;
ALTER TABLE badsubjob MODIFY COLUMN `status` int(11) AFTER `retry`;
ALTER TABLE badsubjob MODIFY COLUMN `host` char(255) AFTER `status`;
ALTER TABLE badsubjob MODIFY COLUMN `macaddress` char(17) AFTER `host`;
ALTER TABLE badsubjob MODIFY COLUMN `address` int(11) AFTER `macaddress`;
ALTER TABLE badsubjob MODIFY COLUMN `data` longtext AFTER `address`;
ALTER TABLE badsubjob MODIFY COLUMN `problem` text AFTER `data`;
SELECT 'banned' as 'processing table...';
ALTER TABLE banned MODIFY COLUMN `macaddress` char(17) FIRST;
ALTER TABLE banned MODIFY COLUMN `name` char(255) AFTER `macaddress`;
ALTER TABLE banned MODIFY COLUMN `address` int(11) AFTER `name`;
SELECT 'duty' as 'processing table...';
ALTER TABLE duty MODIFY COLUMN `id` char(64) FIRST;
ALTER TABLE duty MODIFY COLUMN `jobid` int(11) AFTER `id`;
ALTER TABLE duty MODIFY COLUMN `subid` int(11) AFTER `jobid`;
ALTER TABLE duty MODIFY COLUMN `macaddress` char(17) AFTER `subid`;
ALTER TABLE duty MODIFY COLUMN `lastupdate` int(11) AFTER `macaddress`;
ALTER TABLE duty MODIFY COLUMN `preempt` int(11) AFTER `lastupdate`;
ALTER TABLE duty MODIFY COLUMN `ghost` int(11) AFTER `preempt`;
ALTER TABLE duty MODIFY COLUMN `user` char(64) AFTER `ghost`;
ALTER TABLE duty MODIFY COLUMN `pgrp` int(11) AFTER `user`;
ALTER TABLE duty MODIFY COLUMN `instance_type` int(11) AFTER `pgrp`;
ALTER TABLE duty MODIFY COLUMN `license_provider_name` varchar(64) AFTER `instance_type`;
SELECT 'globalcallback' as 'processing table...';
ALTER TABLE globalcallback MODIFY COLUMN `id` int(11) FIRST;
ALTER TABLE globalcallback MODIFY COLUMN `language` int(11) AFTER `id`;
ALTER TABLE globalcallback MODIFY COLUMN `code` text AFTER `language`;
ALTER TABLE globalcallback MODIFY COLUMN `count` int(11) AFTER `code`;
ALTER TABLE globalcallback MODIFY COLUMN `max` int(11) AFTER `count`;
ALTER TABLE globalcallback MODIFY COLUMN `triggers` text AFTER `max`;
ALTER TABLE globalcallback MODIFY COLUMN `ready` text AFTER `triggers`;
ALTER TABLE globalcallback MODIFY COLUMN `user` char(64) AFTER `ready`;
ALTER TABLE globalcallback MODIFY COLUMN `lastupdate` int(11) AFTER `user`;
ALTER TABLE globalcallback MODIFY COLUMN `timesubmit` int(11) AFTER `lastupdate`;
SELECT 'globalevent' as 'processing table...';
ALTER TABLE globalevent MODIFY COLUMN `uq` int(11) FIRST;
ALTER TABLE globalevent MODIFY COLUMN `pid` int(11) AFTER `uq`;
ALTER TABLE globalevent MODIFY COLUMN `pgrp` int(11) AFTER `pid`;
ALTER TABLE globalevent MODIFY COLUMN `category` int(11) AFTER `pgrp`;
ALTER TABLE globalevent MODIFY COLUMN `jobid` int(11) AFTER `category`;
ALTER TABLE globalevent MODIFY COLUMN `start` int(11) AFTER `jobid`;
ALTER TABLE globalevent MODIFY COLUMN `inter` int(11) AFTER `start`;
ALTER TABLE globalevent MODIFY COLUMN `extra` char(255) AFTER `inter`;
ALTER TABLE globalevent MODIFY COLUMN `name` char(128) AFTER `extra`;
ALTER TABLE globalevent MODIFY COLUMN `flag` int(11) AFTER `name`;
ALTER TABLE globalevent MODIFY COLUMN `callback` int(11) AFTER `flag`;
ALTER TABLE globalevent MODIFY COLUMN `label` char(255) AFTER `callback`;
ALTER TABLE globalevent MODIFY COLUMN `lastupdate` int(11) AFTER `label`;
SELECT 'globalresource' as 'processing table...';
ALTER TABLE globalresource MODIFY COLUMN `name` char(255) FIRST;
ALTER TABLE globalresource MODIFY COLUMN `exttotal` int(11) AFTER `name`;
ALTER TABLE globalresource MODIFY COLUMN `extused` int(11) AFTER `exttotal`;
ALTER TABLE globalresource MODIFY COLUMN `total` int(11) AFTER `extused`;
ALTER TABLE globalresource MODIFY COLUMN `used` int(11) AFTER `total`;
SELECT 'grp' as 'processing table...';
ALTER TABLE grp MODIFY COLUMN `uq` char(255) FIRST;
ALTER TABLE grp MODIFY COLUMN `user` char(255) AFTER `uq`;
ALTER TABLE grp MODIFY COLUMN `name` char(255) AFTER `user`;
ALTER TABLE grp MODIFY COLUMN `access` int(11) AFTER `name`;
ALTER TABLE grp MODIFY COLUMN `valid` int(11) AFTER `access`;
ALTER TABLE grp MODIFY COLUMN `lastupdate` int(11) AFTER `valid`;
SELECT 'host' as 'processing table...';
ALTER TABLE host MODIFY COLUMN `name` char(255) FIRST;
ALTER TABLE host MODIFY COLUMN `macaddress` char(17) AFTER `name`;
ALTER TABLE host MODIFY COLUMN `address` int(11) AFTER `macaddress`;
ALTER TABLE host MODIFY COLUMN `state` int(11) AFTER `address`;
ALTER TABLE host MODIFY COLUMN `cluster` text AFTER `state`;
ALTER TABLE host MODIFY COLUMN `description` text AFTER `cluster`;
ALTER TABLE host MODIFY COLUMN `queue` char(255) AFTER `description`;
ALTER TABLE host MODIFY COLUMN `total_cpus` int(11) AFTER `queue`;
ALTER TABLE host MODIFY COLUMN `used_cpus` int(11) AFTER `total_cpus`;
ALTER TABLE host MODIFY COLUMN `groups` text AFTER `used_cpus`;
ALTER TABLE host MODIFY COLUMN `resources` text AFTER `groups`;
ALTER TABLE host MODIFY COLUMN `restrictions` text AFTER `resources`;
ALTER TABLE host MODIFY COLUMN `properties` text AFTER `restrictions`;
ALTER TABLE host MODIFY COLUMN `stats` text AFTER `properties`;
ALTER TABLE host MODIFY COLUMN `locks` text AFTER `stats`;
ALTER TABLE host MODIFY COLUMN `recontact` int(11) AFTER `locks`;
ALTER TABLE host MODIFY COLUMN `requeue` int(11) AFTER `recontact`;
ALTER TABLE host MODIFY COLUMN `lastcontact` int(11) AFTER `requeue`;
ALTER TABLE host MODIFY COLUMN `migrate` int(11) AFTER `lastcontact`;
ALTER TABLE host MODIFY COLUMN `lastupdate` int(11) AFTER `migrate`;
ALTER TABLE host MODIFY COLUMN `flags` int(11) AFTER `lastupdate`;
ALTER TABLE host MODIFY COLUMN `reason` text AFTER `flags`;
ALTER TABLE host MODIFY COLUMN `jobtypes` text AFTER `reason`;
ALTER TABLE host MODIFY COLUMN `license_provider_name` varchar(64) AFTER `jobtypes`;
ALTER TABLE host MODIFY COLUMN `license_provider_key` char(32) AFTER `license_provider_name`;
ALTER TABLE host MODIFY COLUMN `license_provider_validation_data` varchar(128) AFTER `license_provider_key`;
ALTER TABLE host MODIFY COLUMN `info` text AFTER `license_provider_validation_data`;
SELECT 'hostconfig' as 'processing table...';
ALTER TABLE hostconfig MODIFY COLUMN `name` char(255) FIRST;
ALTER TABLE hostconfig MODIFY COLUMN `address` int(11) AFTER `name`;
ALTER TABLE hostconfig MODIFY COLUMN `state` int(11) AFTER `address`;
ALTER TABLE hostconfig MODIFY COLUMN `cluster` text AFTER `state`;
ALTER TABLE hostconfig MODIFY COLUMN `total_cpus` int(11) AFTER `cluster`;
ALTER TABLE hostconfig MODIFY COLUMN `used_cpus` int(11) AFTER `total_cpus`;
ALTER TABLE hostconfig MODIFY COLUMN `resources` text AFTER `used_cpus`;
ALTER TABLE hostconfig MODIFY COLUMN `properties` text AFTER `resources`;
ALTER TABLE hostconfig MODIFY COLUMN `stats` text AFTER `properties`;
ALTER TABLE hostconfig MODIFY COLUMN `recontact` int(11) AFTER `stats`;
ALTER TABLE hostconfig MODIFY COLUMN `flags` int(11) AFTER `recontact`;
ALTER TABLE hostconfig MODIFY COLUMN `info` text AFTER `flags`;
ALTER TABLE hostconfig MODIFY COLUMN `lastupdate` int(11) AFTER `info`;
SELECT 'job' as 'processing table...';
ALTER TABLE job MODIFY COLUMN `id` int(11) FIRST;
ALTER TABLE job MODIFY COLUMN `serverid` int(11) AFTER `id`;
ALTER TABLE job MODIFY COLUMN `pid` int(11) AFTER `serverid`;
ALTER TABLE job MODIFY COLUMN `pgrp` int(11) AFTER `pid`;
ALTER TABLE job MODIFY COLUMN `cluster` text AFTER `pgrp`;
ALTER TABLE job MODIFY COLUMN `priority` int(11) AFTER `cluster`;
ALTER TABLE job MODIFY COLUMN `localorder` int(11) AFTER `priority`;
ALTER TABLE job MODIFY COLUMN `globalorder` int(11) AFTER `localorder`;
ALTER TABLE job MODIFY COLUMN `status` int(11) AFTER `globalorder`;
ALTER TABLE job MODIFY COLUMN `subjobstatus` int(11) AFTER `status`;
ALTER TABLE job MODIFY COLUMN `agendastatus` int(11) AFTER `subjobstatus`;
ALTER TABLE job MODIFY COLUMN `user` char(64) AFTER `agendastatus`;
ALTER TABLE job MODIFY COLUMN `domain` char(255) AFTER `user`;
ALTER TABLE job MODIFY COLUMN `name` char(255) AFTER `domain`;
ALTER TABLE job MODIFY COLUMN `label` char(255) AFTER `name`;
ALTER TABLE job MODIFY COLUMN `queue` char(255) AFTER `label`;
ALTER TABLE job MODIFY COLUMN `package` longtext AFTER `queue`;
ALTER TABLE job MODIFY COLUMN `flags` int(11) AFTER `package`;
ALTER TABLE job MODIFY COLUMN `cpus` int(11) AFTER `flags`;
ALTER TABLE job MODIFY COLUMN `max_cpus` int(11) AFTER `cpus`;
ALTER TABLE job MODIFY COLUMN `immediatecpus` int(11) AFTER `max_cpus`;
ALTER TABLE job MODIFY COLUMN `todo` int(11) AFTER `immediatecpus`;
ALTER TABLE job MODIFY COLUMN `watch` int(11) AFTER `todo`;
ALTER TABLE job MODIFY COLUMN `restrictions` text AFTER `watch`;
ALTER TABLE job MODIFY COLUMN `requirements` text AFTER `restrictions`;
ALTER TABLE job MODIFY COLUMN `reservations` text AFTER `requirements`;
ALTER TABLE job MODIFY COLUMN `hosts` text AFTER `reservations`;
ALTER TABLE job MODIFY COLUMN `omithosts` text AFTER `hosts`;
ALTER TABLE job MODIFY COLUMN `hostorder` text AFTER `omithosts`;
ALTER TABLE job MODIFY COLUMN `groups` text AFTER `hostorder`;
ALTER TABLE job MODIFY COLUMN `omitgroups` text AFTER `groups`;
ALTER TABLE job MODIFY COLUMN `data` longtext AFTER `omitgroups`;
ALTER TABLE job MODIFY COLUMN `env` text AFTER `data`;
ALTER TABLE job MODIFY COLUMN `pathmap` text AFTER `env`;
ALTER TABLE job MODIFY COLUMN `notes` text AFTER `pathmap`;
ALTER TABLE job MODIFY COLUMN `account` text AFTER `notes`;
ALTER TABLE job MODIFY COLUMN `prototype` char(255) AFTER `account`;
ALTER TABLE job MODIFY COLUMN `kind` char(255) AFTER `prototype`;
ALTER TABLE job MODIFY COLUMN `path` text AFTER `kind`;
ALTER TABLE job MODIFY COLUMN `reason` text AFTER `path`;
ALTER TABLE job MODIFY COLUMN `cpustally` char(128) AFTER `reason`;
ALTER TABLE job MODIFY COLUMN `todotally` char(128) AFTER `cpustally`;
ALTER TABLE job MODIFY COLUMN `lastupdate` int(11) AFTER `todotally`;
ALTER TABLE job MODIFY COLUMN `timesubmit` int(11) AFTER `lastupdate`;
ALTER TABLE job MODIFY COLUMN `timestart` int(11) AFTER `timesubmit`;
ALTER TABLE job MODIFY COLUMN `timecomplete` int(11) AFTER `timestart`;
ALTER TABLE job MODIFY COLUMN `timeout` int(11) AFTER `timecomplete`;
ALTER TABLE job MODIFY COLUMN `agendatimeout` int(11) AFTER `timeout`;
ALTER TABLE job MODIFY COLUMN `automigratecount` int(11) AFTER `agendatimeout`;
ALTER TABLE job MODIFY COLUMN `start` int(11) AFTER `automigratecount`;
ALTER TABLE job MODIFY COLUMN `pending` int(11) AFTER `start`;
ALTER TABLE job MODIFY COLUMN `running` int(11) AFTER `pending`;
ALTER TABLE job MODIFY COLUMN `maskstatus` int(11) AFTER `running`;
ALTER TABLE job MODIFY COLUMN `waiting` int(11) AFTER `maskstatus`;
ALTER TABLE job MODIFY COLUMN `done` int(11) AFTER `waiting`;
ALTER TABLE job MODIFY COLUMN `retrysubjob` int(11) AFTER `done`;
ALTER TABLE job MODIFY COLUMN `retrywork` int(11) AFTER `retrysubjob`;
ALTER TABLE job MODIFY COLUMN `retrywork_delay` int(11) AFTER `retrywork`;
ALTER TABLE job MODIFY COLUMN `stub` text AFTER `retrywork_delay`;
ALTER TABLE job MODIFY COLUMN `dependency` text AFTER `stub`;
ALTER TABLE job MODIFY COLUMN `mailaddress` text AFTER `dependency`;
ALTER TABLE job MODIFY COLUMN `prototypepath` text AFTER `mailaddress`;
ALTER TABLE job MODIFY COLUMN `sourcehost` int(11) AFTER `prototypepath`;
ALTER TABLE job MODIFY COLUMN `deadline` int(11) AFTER `sourcehost`;
ALTER TABLE job MODIFY COLUMN `events` int(11) AFTER `deadline`;
ALTER TABLE job MODIFY COLUMN `eta` int(11) AFTER `events`;
ALTER TABLE job MODIFY COLUMN `prod_show` text AFTER `eta`;
ALTER TABLE job MODIFY COLUMN `prod_shot` text AFTER `prod_show`;
ALTER TABLE job MODIFY COLUMN `prod_seq` text AFTER `prod_shot`;
ALTER TABLE job MODIFY COLUMN `prod_client` text AFTER `prod_seq`;
ALTER TABLE job MODIFY COLUMN `prod_dept` text AFTER `prod_client`;
ALTER TABLE job MODIFY COLUMN `prod_custom1` text AFTER `prod_dept`;
ALTER TABLE job MODIFY COLUMN `prod_custom2` text AFTER `prod_custom1`;
ALTER TABLE job MODIFY COLUMN `prod_custom3` text AFTER `prod_custom2`;
ALTER TABLE job MODIFY COLUMN `prod_custom4` text AFTER `prod_custom3`;
ALTER TABLE job MODIFY COLUMN `prod_custom5` text AFTER `prod_custom4`;
ALTER TABLE job MODIFY COLUMN `preflights` text AFTER `prod_custom5`;
ALTER TABLE job MODIFY COLUMN `postflights` text AFTER `preflights`;
ALTER TABLE job MODIFY COLUMN `agenda_preflights` text AFTER `postflights`;
ALTER TABLE job MODIFY COLUMN `agenda_postflights` text AFTER `agenda_preflights`;
ALTER TABLE job MODIFY COLUMN `dbversion` int(11) AFTER `agenda_postflights`;
SELECT 'jobid' as 'processing table...';
ALTER TABLE jobid MODIFY COLUMN `id` int(11) FIRST;
ALTER TABLE jobid MODIFY COLUMN `realid` int(11) AFTER `id`;
ALTER TABLE jobid MODIFY COLUMN `serverid` int(11) AFTER `realid`;
SELECT 'lostevent' as 'processing table...';
ALTER TABLE lostevent MODIFY COLUMN `uq` int(11) FIRST;
ALTER TABLE lostevent MODIFY COLUMN `pid` int(11) AFTER `uq`;
ALTER TABLE lostevent MODIFY COLUMN `pgrp` int(11) AFTER `pid`;
ALTER TABLE lostevent MODIFY COLUMN `category` int(11) AFTER `pgrp`;
ALTER TABLE lostevent MODIFY COLUMN `jobid` int(11) AFTER `category`;
ALTER TABLE lostevent MODIFY COLUMN `subid` int(11) AFTER `jobid`;
ALTER TABLE lostevent MODIFY COLUMN `workid` text AFTER `subid`;
ALTER TABLE lostevent MODIFY COLUMN `textid` text AFTER `workid`;
ALTER TABLE lostevent MODIFY COLUMN `start` int(11) AFTER `textid`;
ALTER TABLE lostevent MODIFY COLUMN `inter` int(11) AFTER `start`;
ALTER TABLE lostevent MODIFY COLUMN `extra` char(255) AFTER `inter`;
ALTER TABLE lostevent MODIFY COLUMN `name` char(128) AFTER `extra`;
ALTER TABLE lostevent MODIFY COLUMN `flag` int(11) AFTER `name`;
ALTER TABLE lostevent MODIFY COLUMN `callback` int(11) AFTER `flag`;
ALTER TABLE lostevent MODIFY COLUMN `label` char(255) AFTER `callback`;
SELECT 'passwd' as 'processing table...';
ALTER TABLE passwd MODIFY COLUMN `uq` char(255) FIRST;
ALTER TABLE passwd MODIFY COLUMN `user` char(255) AFTER `uq`;
ALTER TABLE passwd MODIFY COLUMN `domain` char(255) AFTER `user`;
ALTER TABLE passwd MODIFY COLUMN `passwd` char(255) AFTER `domain`;
ALTER TABLE passwd MODIFY COLUMN `verified` int(11) AFTER `passwd`;
ALTER TABLE passwd MODIFY COLUMN `valid` int(11) AFTER `verified`;
ALTER TABLE passwd MODIFY COLUMN `lastupdate` int(11) AFTER `valid`;
SELECT 'reservation' as 'processing table...';
ALTER TABLE reservation MODIFY COLUMN `address` int(11) FIRST;
ALTER TABLE reservation MODIFY COLUMN `jobid` int(11) AFTER `address`;
ALTER TABLE reservation MODIFY COLUMN `subid` int(11) AFTER `jobid`;
ALTER TABLE reservation MODIFY COLUMN `timeout` int(11) AFTER `subid`;
SELECT 'restriction' as 'processing table...';
ALTER TABLE restriction MODIFY COLUMN `address` char(17) FIRST;
ALTER TABLE restriction MODIFY COLUMN `jobid` int(11) AFTER `address`;
ALTER TABLE restriction MODIFY COLUMN `timeout` int(11) AFTER `jobid`;
SELECT 'supervisor' as 'processing table...';
ALTER TABLE supervisor MODIFY COLUMN `id` int(11) FIRST;
ALTER TABLE supervisor MODIFY COLUMN `name` text AFTER `id`;
ALTER TABLE supervisor MODIFY COLUMN `region` char(255) AFTER `name`;
ALTER TABLE supervisor MODIFY COLUMN `address` int(11) AFTER `region`;
ALTER TABLE supervisor MODIFY COLUMN `state` int(11) AFTER `address`;
ALTER TABLE supervisor MODIFY COLUMN `lastsync` int(11) AFTER `state`;
SELECT 'user' as 'processing table...';
ALTER TABLE user MODIFY COLUMN `name` char(255) FIRST;
ALTER TABLE user MODIFY COLUMN `passwd` char(255) AFTER `name`;
ALTER TABLE user MODIFY COLUMN `groups` text AFTER `passwd`;
ALTER TABLE user MODIFY COLUMN `access` int(10) AFTER `groups`;
ALTER TABLE user MODIFY COLUMN `timeadded` int(11) AFTER `access`;
ALTER TABLE user MODIFY COLUMN `sudouserfilter` text AFTER `timeadded`;
ALTER TABLE user MODIFY COLUMN `sudojobfilter` text AFTER `sudouserfilter`;
ALTER TABLE user MODIFY COLUMN `groupaccess` text AFTER `sudojobfilter`;
ALTER TABLE user MODIFY COLUMN `valid` int(11) AFTER `groupaccess`;
ALTER TABLE user MODIFY COLUMN `lastupdate` int(11) AFTER `valid`;
