ALTER TABLE `oa_project` ADD `taskStatus` char(30) NOT NULL AFTER `status`;

ALTER TABLE `sys_kanban` RENAME TO `sys_kanbanregion`;
ALTER TABLE `sys_kanbanregion` CHANGE COLUMN `id` `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT; 
ALTER TABLE `sys_kanbanregion` CHANGE COLUMN `objectID` `project` mediumint(8) unsigned NOT NULL; 
ALTER TABLE `sys_kanbanregion` DROP COLUMN `objectType`; 
ALTER TABLE `sys_kanbanregion` ADD `name` varchar(90) NOT NULL;
ALTER TABLE `sys_kanbanregion` ADD `order` tinyint(3) unsigned NOT NULL;
ALTER TABLE `sys_kanbanregion` ADD `createdBy` char(30) NOT NULL;
ALTER TABLE `sys_kanbanregion` ADD `createdDate` datetime NOT NULL;
ALTER TABLE `sys_kanbanregion` ADD `editedBy` char(30) NOT NULL;
ALTER TABLE `sys_kanbanregion` ADD `editedDate` datetime NOT NULL;
ALTER TABLE `sys_kanbanregion` ADD `deleted` enum('0','1') NOT NULL DEFAULT '0';

ALTER TABLE `sys_kanbanlane` CHANGE COLUMN `kanban` `region` mediumint(8) unsigned NOT NULL;
ALTER TABLE `sys_kanbanlane` ADD `group` tinyint(3) unsigned NOT NULL AFTER `region`;
ALTER TABLE `sys_kanbanlane` CHANGE COLUMN `name` `name` varchar(90) NOT NULL;
ALTER TABLE `sys_kanbanlane` ADD `color` varchar(10) NOT NULL AFTER `name`;

ALTER TABLE `sys_kanbancolumn` CHANGE COLUMN `kanban` `region` mediumint(8) unsigned NOT NULL;
ALTER TABLE `sys_kanbancolumn` ADD `group` tinyint(3) unsigned NOT NULL AFTER `region`;
ALTER TABLE `sys_kanbancolumn` ADD `parent` mediumint(8) unsigned NOT NULL AFTER `group`;
ALTER TABLE `sys_kanbancolumn` CHANGE COLUMN `name` `name` varchar(90) NOT NULL;
ALTER TABLE `sys_kanbancolumn` ADD `color` varchar(10) NOT NULL AFTER `name`;
ALTER TABLE `sys_kanbancolumn` ADD `limit` smallint(5) unsigned NOT NULL AFTER `color`;
ALTER TABLE `sys_kanbancolumn` ADD `archivedBy` varchar(30) NOT NULL AFTER `editedDate`;
ALTER TABLE `sys_kanbancolumn` ADD `archivedDate` datetime NOT NULL AFTER `archivedBy`;
ALTER TABLE `sys_kanbancolumn` ADD `archived` enum('0', '1') NOT NULL DEFAULT '0' AFTER `archivedDate`;
ALTER TABLE `sys_kanbancolumn` DROP COLUMN `taskOrder`; 

ALTER TABLE `sys_task` ADD `kanbanRegion` mediumint(8) unsigned NOT NULL AFTER `parent`;
ALTER TABLE `sys_task` ADD `kanbanColumn` mediumint(8) unsigned NOT NULL AFTER `kanbanLane`;
ALTER TABLE `sys_task` ADD `kanbanOrder` tinyint(3) unsigned NOT NULL AFTER `kanbanColumn`;
ALTER TABLE `sys_task` ADD `archivedBy` varchar(30) NOT NULL AFTER `editedDate`;
ALTER TABLE `sys_task` ADD `archivedDate` datetime NOT NULL AFTER `archivedBy`;
ALTER TABLE `sys_task` ADD `archived` enum('0', '1') NOT NULL DEFAULT '0' AFTER `archivedDate`;
