aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Mathes <adam@trenchant.org>2017-03-09 08:52:03 -0800
committerAdam Mathes <adam@trenchant.org>2017-03-09 08:52:03 -0800
commit0630c3cf75243a53e0e5b2b2a084ca28f5d335df (patch)
treee0c369cead6cf6f92c8259da7743ff7e5db5f3c7
parent51ec94414baf43fb637aad6ac17c8f60bedd14eb (diff)
downloadneko-0630c3cf75243a53e0e5b2b2a084ca28f5d335df.tar.gz
neko-0630c3cf75243a53e0e5b2b2a084ca28f5d335df.tar.bz2
neko-0630c3cf75243a53e0e5b2b2a084ca28f5d335df.zip
db should use utf-8, increase length of varchar fields
-rw-r--r--init.sql11
1 files changed, 7 insertions, 4 deletions
diff --git a/init.sql b/init.sql
index d050359..d69d5e9 100644
--- a/init.sql
+++ b/init.sql
@@ -1,8 +1,11 @@
+SET NAMES 'utf8';
+SET CHARACTER SET utf8;
+
CREATE TABLE feed (
id INT NOT NULL AUTO_INCREMENT,
- url VARCHAR(100) NOT NULL,
- web_url VARCHAR(100) NOT NULL DEFAULT "",
- title VARCHAR(100) NOT NULL DEFAULT "",
+ url VARCHAR(255) NOT NULL,
+ web_url VARCHAR(255) NOT NULL DEFAULT "",
+ title VARCHAR(255) NOT NULL DEFAULT "",
last_updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
UNIQUE KEY (url),
PRIMARY KEY (id)
@@ -12,7 +15,7 @@ CREATE TABLE item (
id INT NOT NULL AUTO_INCREMENT,
feed_id INT NOT NULL,
title TEXT,
- url VARCHAR(100) NOT NULL,
+ url VARCHAR(255) NOT NULL,
description TEXT,
publish_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
read_state BOOLEAN DEFAULT FALSE NOT NULL,