 DROP TABLE IF EXISTS blog_comment;
 
 CREATE TABLE blog_comment (
-	id INT NOT NULL AUTO_INCREMENT COMMENT '主键',
-	create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
-  update_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
-	web_visitor_id INT NOT NULL COMMENT '访客id',
-	blog_id INT NOT NULL COMMENT '文章ID',
-	comment VARCHAR(2000) NOT NULL COMMENT '评论内容',
-	reply_comment_id INT(11) NULL COMMENT '父级评论',
-  parents_comment_id VARCHAR(128) NOT NULL DEFAULT '0,' COMMENT '父级评论路径',
+	id INT AUTO_INCREMENT COMMENT '主键',
+	create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  update_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+	web_visitor_id INT COMMENT '访客id',
+	blog_id INT COMMENT '文章ID',
+	comment VARCHAR(2000) COMMENT '评论内容',
+	reply_comment_id INT(11) COMMENT '父级评论',
+  parents_comment_id VARCHAR(128) DEFAULT '0,' COMMENT '父级评论路径',
 	PRIMARY KEY (id)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='blog评论表';

DROP TABLE IF EXISTS blog_love;

CREATE TABLE blog_love (
  id             INT       NOT NULL AUTO_INCREMENT
  COMMENT '主键',
  create_time    TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
  COMMENT '创建时间',
  update_time    TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
  COMMENT '更新时间',
  blog_id        INT       NOT NULL
  COMMENT 'blogID',
  web_visitor_id INT       NOT NULL
  COMMENT '访客ID',
  PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='blog喜欢表';

DROP TABLE IF EXISTS friend_link;

CREATE TABLE friend_link (
  id          INT         AUTO_INCREMENT
  COMMENT '主键',
  create_time TIMESTAMP   DEFAULT CURRENT_TIMESTAMP
  COMMENT '创建时间',
  update_time TIMESTAMP   DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
  COMMENT '更新时间',
  friend_name VARCHAR(45)
  COMMENT '朋友名',
  url         VARCHAR(64) DEFAULT '#'
  COMMENT '友情链接',
  PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='友情链接表';
