Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2014
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 1.41 KB | None | 0 0
  1. DROP TABLE IF EXISTS `work_comment`;
  2. CREATE TABLE `work_comment` (
  3.   `id` int(11) NOT NULL AUTO_INCREMENT,
  4.   `parent` int(11) DEFAULT NULL,
  5.   `task_id` int(11) NOT NULL,
  6.   `user_id` int(11) NOT NULL,
  7.   `date` datetime DEFAULT NULL,
  8.   `comment` text COLLATE utf8_czech_ci,
  9.   `confirmed` tinyint(1) NOT NULL DEFAULT '0',
  10.   PRIMARY KEY (`id`),
  11.   KEY `task_id` (`task_id`),
  12.   KEY `user_id` (`user_id`),
  13.   KEY `parent` (`parent`),
  14.   CONSTRAINT `work_comment_ibfk_1` FOREIGN KEY (`task_id`) REFERENCES `work_task` (`id`),
  15.   CONSTRAINT `work_comment_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `work_user` (`id`),
  16.   CONSTRAINT `work_comment_ibfk_3` FOREIGN KEY (`parent`) REFERENCES `work_comment` (`id`)
  17. ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
  18.  
  19.  
  20. DROP TABLE IF EXISTS `work_task`;
  21. CREATE TABLE `work_task` (
  22.   `id` int(11) NOT NULL AUTO_INCREMENT,
  23.   `title` varchar(150) COLLATE utf8_czech_ci DEFAULT NULL,
  24.   `description` text COLLATE utf8_czech_ci,
  25.   `user_id` int(11) NOT NULL,
  26.   `date` datetime DEFAULT NULL,
  27.   `date_end` datetime DEFAULT NULL,
  28.   `price` int(11) DEFAULT NULL,
  29.   `state` tinyint(4) NOT NULL DEFAULT '0',
  30.   `confirmed` tinyint(1) NOT NULL DEFAULT '0',
  31.   PRIMARY KEY (`id`),
  32.   KEY `user_id` (`user_id`),
  33.   CONSTRAINT `work_task_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `work_user` (`id`)
  34. ) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement