MySQL: Reduce field size for hood to VARCHAR(30)

This is just a change of the database!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Adrian Schmutzler 2017-12-28 17:16:39 +01:00
parent a44970425e
commit 58a3747be8
3 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ mysql = FreifunkMySQL()
mysql.execute("""
CREATE TABLE hoods (
`id` int(11) NOT NULL,
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`name` varchar(30) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`net` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
`lat` double DEFAULT NULL,
`lng` double DEFAULT NULL,

View File

@ -67,7 +67,7 @@ mysql.execute("""
`description` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
`position_comment` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
`community` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
`hood` varchar(200) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`hood` varchar(30) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`status_text` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
`contact` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
`lng` double DEFAULT NULL,

View File

@ -25,7 +25,7 @@ mysql.execute("""
mysql.execute("""
CREATE TABLE stats_hood (
`hood` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`hood` varchar(30) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`time` int(11) NOT NULL,
`clients` mediumint(9) NOT NULL,
`online` smallint(6) NOT NULL,