aboutsummaryrefslogtreecommitdiff
path: root/mysql_schema.sql
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2023-03-02 02:17:52 +0300
committerEvgeny Zinoviev <me@ch1p.io>2023-03-02 02:17:52 +0300
commit917d2622aa5fe748c1cda914eae94c12be743c42 (patch)
tree946d30723c32e0834eb7a74bfa7cb766d22bbd2a /mysql_schema.sql
parent6daf574fd3f18909be05b0d61335e7634329ec45 (diff)
support tables and emojies in markdown
Diffstat (limited to 'mysql_schema.sql')
-rw-r--r--mysql_schema.sql32
1 files changed, 18 insertions, 14 deletions
diff --git a/mysql_schema.sql b/mysql_schema.sql
index 68c9479..fa5459b 100644
--- a/mysql_schema.sql
+++ b/mysql_schema.sql
@@ -22,24 +22,28 @@ CREATE TABLE `config` (
CREATE TABLE `pages` (
`short_name` char(64) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
`title` char(255) NOT NULL,
- `md` text NOT NULL DEFAULT '',
- `html` text NOT NULL DEFAULT '',
- `ts` int(10) UNSIGNED NOT NULL DEFAULT 0,
- `update_ts` int(10) UNSIGNED NOT NULL DEFAULT 0,
- `visible` tinyint(3) UNSIGNED NOT NULL DEFAULT 0
+ `md` text CHARACTER SET utf8mb4 NOT NULL DEFAULT '\'\'',
+ `html` text CHARACTER SET utf8mb4 NOT NULL DEFAULT '\'\'',
+ `ts` int(10) unsigned NOT NULL DEFAULT 0,
+ `update_ts` int(10) unsigned NOT NULL DEFAULT 0,
+ `visible` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ PRIMARY KEY (`short_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `posts` (
- `id` int(10) UNSIGNED NOT NULL,
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` char(255) NOT NULL,
- `md` text NOT NULL,
- `html` text NOT NULL,
- `text` text NOT NULL,
- `ts` int(10) UNSIGNED NOT NULL DEFAULT 0,
- `update_ts` int(10) UNSIGNED NOT NULL DEFAULT 0,
- `visible` tinyint(1) UNSIGNED NOT NULL DEFAULT 0,
- `short_name` char(64) NOT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+ `md` text CHARACTER SET utf8mb4 NOT NULL,
+ `html` text CHARACTER SET utf8mb4 NOT NULL,
+ `text` text CHARACTER SET utf8mb4 NOT NULL,
+ `ts` int(10) unsigned NOT NULL DEFAULT 0,
+ `update_ts` int(10) unsigned NOT NULL DEFAULT 0,
+ `visible` tinyint(1) unsigned NOT NULL DEFAULT 0,
+ `short_name` char(64) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `short_name` (`short_name`),
+ KEY ` visible_ts_idx` (`visible`,`ts`)
+) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8;
CREATE TABLE `posts_tags` (
`id` int(11) NOT NULL,