0.9.1.sql 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. ALTER TABLE `dealwithithist` ADD `datetimedone` DATETIME NULL DEFAULT NULL AFTER `date`;
  2. UPDATE `dealwithithist` as `C` INNER JOIN (SELECT `mtime`,`originalid` FROM `dealwithithist` WHERE `done` = '1' AND `datetimedone` is NULL) as `A` on `C`.`originalid` = `A`.`originalid` SET `C`.`datetimedone` = `A`.`mtime`;
  3. CREATE TABLE IF NOT EXISTS `sms_history` (
  4. `id` int(11) NOT NULL AUTO_INCREMENT,
  5. `login` varchar(255) NOT NULL,
  6. `phone` varchar(255) NOT NULL,
  7. `srvmsgself_id` varchar(255) NOT NULL,
  8. `srvmsgpack_id` varchar(255) NOT NULL,
  9. `date_send` datetime NOT NULL,
  10. `date_statuschk` datetime NOT NULL,
  11. `delivered` tinyint(1) UNSIGNED DEFAULT 0,
  12. `no_statuschk` tinyint(1) UNSIGNED DEFAULT 0,
  13. `send_status` varchar(255) NOT NULL DEFAULT '',
  14. `msg_text` varchar(255) NOT NULL DEFAULT '',
  15. PRIMARY KEY (`id`),
  16. KEY `login` (`login`) USING BTREE,
  17. KEY `phone` (`phone`) USING BTREE,
  18. KEY `date_send` (`date_send`) USING BTREE
  19. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
  20. CREATE TABLE IF NOT EXISTS `taskmandone` (
  21. `id` int(11) NOT NULL AUTO_INCREMENT,
  22. `taskid` int(11) DEFAULT NULL,
  23. `date` datetime NOT NULL,
  24. PRIMARY KEY (`id`)
  25. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
  26. CREATE TABLE IF NOT EXISTS `punchscripts` (
  27. `id` int(11) NOT NULL AUTO_INCREMENT,
  28. `alias` varchar(255) NOT NULL,
  29. `name` varchar(255) NOT NULL,
  30. `content` text,
  31. PRIMARY KEY (`id`),
  32. KEY `alias` (`alias`)
  33. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;