CREATE TABLE `sys_kanban` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `objectType` char(30) NOT NULL,
  `objectID` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `sys_kanbanlane` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `kanban` mediumint(8) unsigned NOT NULL,
  `order` tinyint(3) unsigned NOT NULL,
  `name` varchar(60) NOT NULL,
  `createdBy` varchar(30) NOT NULL,
  `createdDate` datetime NOT NULL,
  `editedBy` varchar(30) NOT NULL,
  `editedDate` datetime NOT NULL,
  `deleted` enum('0', '1') NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `kanban` (`kanban`),
  KEY `order` (`order`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `sys_kanbancolumn` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `kanban` mediumint(8) unsigned NOT NULL,
  `order` tinyint(3) unsigned NOT NULL,
  `name` varchar(60) NOT NULL,
  `taskStatus` varchar(30) NOT NULL,
  `taskOrder` varchar(30) NOT NULL,
  `createdBy` varchar(30) NOT NULL,
  `createdDate` datetime NOT NULL,
  `editedBy` varchar(30) NOT NULL,
  `editedDate` datetime NOT NULL,
  `deleted` enum('0', '1') NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `kanban` (`kanban`),
  KEY `order` (`order`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

ALTER TABLE `sys_task` ADD `kanbanLane` mediumint(8) unsigned NOT NULL AFTER `parent`;
