USE `yupe_test`;

CREATE TABLE `yupe_migrations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `module` varchar(255) NOT NULL,
  `version` varchar(255) NOT NULL,
  `apply_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_migrations_module` (`module`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8;

INSERT INTO `yupe_migrations` VALUES (1,'comment','m000000_000000_comment_base',1379742895);

CREATE TABLE `yupe_comment_comment` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `model` varchar(100) NOT NULL,
  `model_id` int(11) NOT NULL,
  `url` varchar(150) DEFAULT NULL,
  `creation_date` datetime NOT NULL,
  `name` varchar(150) NOT NULL,
  `email` varchar(150) NOT NULL,
  `text` text NOT NULL,
  `status` int(11) NOT NULL DEFAULT '0',
  `ip` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `ix_yupe_comment_comment_status` (`status`),
  KEY `ix_yupe_comment_comment_model_model_id` (`model`,`model_id`),
  KEY `ix_yupe_comment_comment_model` (`model`),
  KEY `ix_yupe_comment_comment_model_id` (`model_id`),
  KEY `ix_yupe_comment_comment_user_id` (`user_id`),
  KEY `ix_yupe_comment_comment_parent_id` (`parent_id`),
  CONSTRAINT `fk_yupe_comment_comment_parent_id` FOREIGN KEY (`parent_id`) REFERENCES `yupe_comment_comment` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
  CONSTRAINT `fk_yupe_comment_comment_user_id` FOREIGN KEY (`user_id`) REFERENCES `yupe_user_user` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;

INSERT INTO `yupe_comment_comment` VALUES (1,NULL,1,'Blog',1,'','2013-10-02 03:55:46','yupe','yupe@localhost','Level-1 Comment-1',1,'127.0.0.1');
INSERT INTO `yupe_comment_comment` VALUES (2,NULL,1,'Blog',1,'','2013-10-02 03:55:51','yupe','yupe@localhost','Level-1 Comment-2',1,'127.0.0.1');
INSERT INTO `yupe_comment_comment` VALUES (3,NULL,1,'Blog',1,'','2013-10-02 03:55:56','yupe','yupe@localhost','Level-1 Comment-3',1,'127.0.0.1');
INSERT INTO `yupe_comment_comment` VALUES (4,2,1,'Blog',1,'','2013-10-02 03:56:05','yupe','yupe@localhost','Level-2 Comment-1',1,'127.0.0.1');
INSERT INTO `yupe_comment_comment` VALUES (5,2,1,'Blog',1,'','2013-10-02 03:56:17','yupe','yupe@localhost','Level-2 Comment-2',1,'127.0.0.1');
INSERT INTO `yupe_comment_comment` VALUES (6,2,1,'Blog',1,'','2013-10-02 03:56:41','yupe','yupe@localhost','Level-2 Comment-3',1,'127.0.0.1');
INSERT INTO `yupe_comment_comment` VALUES (7,5,1,'Blog',1,'','2013-10-02 03:56:59','yupe','yupe@localhost','Level-3 Comment-1',1,'127.0.0.1');
INSERT INTO `yupe_comment_comment` VALUES (8,5,1,'Blog',1,'','2013-10-02 03:57:12','yupe','yupe@localhost','Level-3 Comment-2',1,'127.0.0.1');
INSERT INTO `yupe_comment_comment` VALUES (9,5,1,'Blog',1,'','2013-10-02 03:57:25','yupe','yupe@localhost','Level-3 Comment-3',1,'127.0.0.1');
INSERT INTO `yupe_comment_comment` VALUES (10,8,1,'Blog',1,'','2013-10-02 03:58:29','yupe','yupe@localhost','Level-4 Comment-1',1,'127.0.0.1');
INSERT INTO `yupe_comment_comment` VALUES (11,10,1,'Blog',1,'','2013-10-02 03:58:50','yupe','yupe@localhost','Level-5 Comment-1',1,'127.0.0.1');
INSERT INTO `yupe_comment_comment` VALUES (12,11,1,'Blog',1,'','2013-10-02 03:59:14','yupe','yupe@localhost','Level-6 Comment-1',1,'127.0.0.1');
INSERT INTO `yupe_comment_comment` VALUES (13,12,1,'Blog',1,'','2013-10-02 03:59:28','yupe','yupe@localhost','Level-7 Comment-1',1,'127.0.0.1');
INSERT INTO `yupe_comment_comment` VALUES (14,13,1,'Blog',1,'','2013-10-02 03:59:40','yupe','yupe@localhost','Level-8 Comment-1',1,'127.0.0.1');
INSERT INTO `yupe_comment_comment` VALUES (15,14,1,'Blog',1,'','2013-10-02 03:59:54','yupe','yupe@localhost','Level-9 Comment-1',1,'127.0.0.1');
INSERT INTO `yupe_comment_comment` VALUES (16,15,1,'Blog',1,'','2013-10-02 04:00:05','yupe','yupe@localhost','Level-10 Comment-1',1,'127.0.0.1');
INSERT INTO `yupe_comment_comment` VALUES (17,16,1,'Blog',1,'','2013-10-02 04:00:20','yupe','yupe@localhost','Level-11 Comment-1',1,'127.0.0.1');


