   `id` int(11) NOT NULL AUTO_INCREMENT,
   `dt` datetime NOT NULL,
   `noteid` int(11) NOT NULL,
-  `title` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
-  `content` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+  `title` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
+  `content` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
   `notebook` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
   `trash` tinyint(1) NOT NULL DEFAULT 0,
   `created` datetime NOT NULL,

DROP TABLE IF EXISTS `tag`;
CREATE TABLE `tag` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `noteid` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `ix_noteid` (`noteid`),
  FULLTEXT KEY `ft_name` (`name`)

DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `password` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `displayname` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `role` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `enabled` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL,
  `items` int(11) NOT NULL DEFAULT 10,
