text: CREATE DATABASE  IF NOT EXISTS `test` /*!40100 DEFAULT CHARACTER SET utf8 */;
  USE `test`;
  -- MySQL dump 10.13  Distrib 5.7.9, for Win64 (x86_64)
  --
  -- Host: 192.168.1.192    Database: test
  -- ------------------------------------------------------
  -- Server version	5.7.13
  
  /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  /*!40101 SET NAMES utf8 */;
  /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  /*!40103 SET TIME_ZONE='+00:00' */;
  /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  
  --
  -- Table structure for table `article`
  --
  
  DROP TABLE IF EXISTS `article`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `article` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `category_id` int(10) unsigned NOT NULL DEFAULT '0',
    `title` varchar(45) NOT NULL DEFAULT '',
    `content` text NOT NULL,
    `status` tinyint(4) NOT NULL DEFAULT '0',
    `create_time` int(10) unsigned NOT NULL DEFAULT '0',
    `update_time` int(10) unsigned NOT NULL DEFAULT '0',
    `tag_id` int(11) DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `category_map` (`category_id`),
    CONSTRAINT `category_map` FOREIGN KEY (`category_id`) REFERENCES `category` (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `article`
  --
  
  LOCK TABLES `article` WRITE;
  /*!40000 ALTER TABLE `article` DISABLE KEYS */;
  INSERT INTO `article` VALUES (8,1,'JSP时间戳转时间','adasdsa\r\n<>\r\nsadsda',1,0,0,NULL),(9,1,'编码问题','adadas\r\n这样 \r\n那样\r\n',0,0,0,NULL),(10,2,'Boot','adsad\r\n水电费第三方第三方\r\n',0,0,0,NULL),(11,3,'发多少','dfdsfs\r\nsdsgds\r\n',1,0,0,NULL),(12,1,'这是啥','这是内容',0,0,0,NULL),(29,1,'这是啥','这是内容',0,0,0,NULL),(30,5,'这个的确是标题','这个内容有点少\r\n',-1,0,0,NULL),(31,4,'简书','简单的书',-1,0,0,NULL),(32,1,'Boot','按时大大撒',1,0,0,NULL);
  /*!40000 ALTER TABLE `article` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `article_tag_map`
  --
  
  DROP TABLE IF EXISTS `article_tag_map`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `article_tag_map` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `tag_id` int(10) unsigned NOT NULL DEFAULT '0',
    `article_id` int(10) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (`id`),
    KEY `article_map_idx` (`article_id`),
    KEY `tag_map_idx` (`tag_id`),
    CONSTRAINT `article_map` FOREIGN KEY (`article_id`) REFERENCES `article` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
    CONSTRAINT `tag_map` FOREIGN KEY (`tag_id`) REFERENCES `tag` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
  ) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `article_tag_map`
  --
  
  LOCK TABLES `article_tag_map` WRITE;
  /*!40000 ALTER TABLE `article_tag_map` DISABLE KEYS */;
  INSERT INTO `article_tag_map` VALUES (29,1,29),(30,2,29),(31,3,29),(32,2,30),(33,3,31),(34,1,32),(35,2,32),(36,4,32);
  /*!40000 ALTER TABLE `article_tag_map` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `category`
  --
  
  DROP TABLE IF EXISTS `category`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `category` (
    `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
    `name` varchar(255) DEFAULT NULL,
    `sort` int(11) NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `category`
  --
  
  LOCK TABLES `category` WRITE;
  /*!40000 ALTER TABLE `category` DISABLE KEYS */;
  INSERT INTO `category` VALUES (1,'J2EE',10),(2,'Spring',20),(3,'Hibernate',30),(4,'设计模式',40),(5,'安全',50);
  /*!40000 ALTER TABLE `category` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `notes`
  --
  
  DROP TABLE IF EXISTS `notes`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `notes` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `category` tinyint(3) unsigned NOT NULL DEFAULT '0',
    `title` varchar(45) NOT NULL DEFAULT '',
    `context` longtext NOT NULL,
    `create_time` int(10) unsigned NOT NULL DEFAULT '0',
    `update_time` int(10) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `notes`
  --
  
  LOCK TABLES `notes` WRITE;
  /*!40000 ALTER TABLE `notes` DISABLE KEYS */;
  INSERT INTO `notes` VALUES (3,2,'这是个标题','这是文字\r\n\r\n还有一段在这里\r\n巴拉巴拉\r\n<script type=\"application/javascript\">alert(\"1111\");</script>',1477563320,1477989589),(4,1,'JAVA基本数据类型','有这个\r\n还有那个\r\n七七八八\r\n<script type=\"application/javascript\">alert(\'hahaha\');</script>',1477622984,1477622984),(5,1,'JSP时间戳转时间','<jsp:useBean id=\"dateObject\" class=\"java.util.Date\"/>\r\n<jsp:setProperty name=\"dateObject\" property=\"time\" value=\"${note.update_time*1000}\"/>\r\nLast update at: <fmt:formatDate value=\"${dateObject}\" pattern=\"yyyy-MM-dd HH:mm\"/>',1478070857,1478070857),(9,3,'没用过','不知道好不好用\r\nhahaha\r\n',1478163489,1478163489);
  /*!40000 ALTER TABLE `notes` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `tag`
  --
  
  DROP TABLE IF EXISTS `tag`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `tag` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `name` varchar(45) NOT NULL DEFAULT '',
    `sort` int(10) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `tag`
  --
  
  LOCK TABLES `tag` WRITE;
  /*!40000 ALTER TABLE `tag` DISABLE KEYS */;
  INSERT INTO `tag` VALUES (1,'Spring Boot',10),(2,'Spring MVC',20),(3,'JPA',30),(4,'JSP',40);
  /*!40000 ALTER TABLE `tag` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `type`
  --
  
  DROP TABLE IF EXISTS `type`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `type` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `name` varchar(45) NOT NULL DEFAULT '',
    `sort` int(10) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `type`
  --
  
  LOCK TABLES `type` WRITE;
  /*!40000 ALTER TABLE `type` DISABLE KEYS */;
  INSERT INTO `type` VALUES (1,'J2EE',1),(2,'Spring',2),(3,'Mybatis',4),(4,'Hibernate',3);
  /*!40000 ALTER TABLE `type` ENABLE KEYS */;
  UNLOCK TABLES;
  
  
  CREATE TABLE `user` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `username` varchar(45) NOT NULL DEFAULT '',
    `userpwd` varchar(255) NOT NULL DEFAULT '',
    `role` varchar(45) NOT NULL DEFAULT '',
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  
  --
  -- Dumping events for database 'test'
  --
  
  --
  -- Dumping routines for database 'test'
  --
  /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  
  /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  
  -- Dump completed on 2016-11-09 17:37:33
  