From 0630c3cf75243a53e0e5b2b2a084ca28f5d335df Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Thu, 9 Mar 2017 08:52:03 -0800 Subject: db should use utf-8, increase length of varchar fields --- init.sql | 11 +++++++---- 1 file 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, -- cgit v1.2.3