From 7ad3ae55f9214f4086cd0c5bd2f6fdadf442e3b6 Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 1 Apr 2012 15:44:43 +0100 Subject: [PATCH] inet = char(45) in mysql, to fit IPv6 addrs --- core/database.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/database.class.php b/core/database.class.php index 5f2c1c72..ecd617fd 100644 --- a/core/database.class.php +++ b/core/database.class.php @@ -66,7 +66,7 @@ class MySQL extends DBEngine { public function scoreql_to_sql($data) { $data = str_replace("SCORE_AIPK", "INTEGER PRIMARY KEY auto_increment", $data); - $data = str_replace("SCORE_INET", "CHAR(15)", $data); + $data = str_replace("SCORE_INET", "CHAR(45)", $data); $data = str_replace("SCORE_BOOL_Y", "'Y'", $data); $data = str_replace("SCORE_BOOL_N", "'N'", $data); $data = str_replace("SCORE_BOOL", "ENUM('Y', 'N')", $data); @@ -140,7 +140,7 @@ class SQLite extends DBEngine { public function create_table_sql($name, $data) { $data = str_replace("SCORE_AIPK", "INTEGER PRIMARY KEY", $data); - $data = str_replace("SCORE_INET", "VARCHAR(15)", $data); + $data = str_replace("SCORE_INET", "VARCHAR(45)", $data); $data = str_replace("SCORE_BOOL_Y", "'Y'", $data); $data = str_replace("SCORE_BOOL_N", "'N'", $data); $data = str_replace("SCORE_BOOL", "CHAR(1)", $data);