]> git.mjollnir.org Git - s9y.git/commitdiff
support IPv6 lengths
authorgarvinhicking <garvinhicking>
Wed, 2 May 2007 08:56:17 +0000 (08:56 +0000)
committergarvinhicking <garvinhicking>
Wed, 2 May 2007 08:56:17 +0000 (08:56 +0000)
docs/NEWS
serendipity_config.inc.php
sql/db.sql
sql/db_update_1.2-alpha3_1.2_alpha4_mysql.sql [new file with mode: 0644]
sql/db_update_1.2-alpha3_1.2_alpha4_postgres.sql [new file with mode: 0644]
sql/db_update_1.2-alpha3_1.2_alpha4_sqlite.sql [new file with mode: 0644]

index 9b6f72067faaf76dae9a625fca6e524dc43de027..e90bfea0b7b869b2ffa9e6dbbdfa5125482f028b 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,9 @@
 Version 1.2 ()
 ------------------------------------------------------------------------
 
+    * Change database types for IP addresses to varchar(64) to support
+      IPv6 (garvinhicking)
+
     * Make statistics, karma and spamblock plugin only log 255 characters
       of HTTP User-Agent and Referrer strings to the database, as the 
       fields are only varchar(255). Thanks to jemm4jemm!
index cddb75dacc916228d226efc27fe17394430d25ec..18c9f2b31e2a7805fcdaccae1bbd5ef63d8609f8 100644 (file)
@@ -42,7 +42,7 @@ if (defined('USE_MEMSNAP')) {
 }
 
 // The version string
-$serendipity['version']         = '1.2-alpha3';
+$serendipity['version']         = '1.2-alpha4';
 
 // Setting this to 'false' will enable debugging output. All alpa/beta/cvs snapshot versions will emit debug information by default. To increase the debug level (to enable Smarty debugging), set this flag to 'debug'.
 $serendipity['production']      = (preg_match('@\-(alpha|beta|cvs)@', $serendipity['version']) ? false : true);
index 0c5bfd6da76f979be3dd06691a988a29538643df..b1cb40041709e182b4b913f1c091abfe36939801 100644 (file)
@@ -71,7 +71,7 @@ create table {PREFIX}comments (
   author varchar(80) default null,
   email varchar(200) default null,
   url varchar(200) default null,
-  ip varchar(15) default null,
+  ip varchar(64) default null,
   body text,
   type varchar(100) default 'regular',
   subscribed {BOOLEAN},
@@ -184,7 +184,7 @@ create table {PREFIX}options (
 CREATE INDEX options_idx ON {PREFIX}options (okey);
 
 CREATE TABLE {PREFIX}suppress (
-  ip varchar(15) default NULL,
+  ip varchar(64) default NULL,
   scheme varchar(5),
   host varchar(128),
   port varchar(5),
diff --git a/sql/db_update_1.2-alpha3_1.2_alpha4_mysql.sql b/sql/db_update_1.2-alpha3_1.2_alpha4_mysql.sql
new file mode 100644 (file)
index 0000000..5b65f8a
--- /dev/null
@@ -0,0 +1,2 @@
+ALTER TABLE {PREFIX}comments CHANGE ip ip VARCHAR(64) NOT NULL;
+ALTER TABLE {PREFIX}suppress CHANGE ip ip VARCHAR(65) NOT NULL;
\ No newline at end of file
diff --git a/sql/db_update_1.2-alpha3_1.2_alpha4_postgres.sql b/sql/db_update_1.2-alpha3_1.2_alpha4_postgres.sql
new file mode 100644 (file)
index 0000000..4c5d885
--- /dev/null
@@ -0,0 +1,13 @@
+ALTER TABLE {PREFIX}comments ADD COLUMN oldip varchar(64);
+UPDATE {PREFIX}comments SET oldip = ip;
+ALTER TABLE {PREFIX}comments DROP ip;
+ALTER TABLE {PREFIX}comments ADD COLUMN ip varchar(64);
+UPDATE {PREFIX}comments SET ip = oldip;
+ALTER TABLE {PREFIX}comments DROP COLUMN oldip;
+
+ALTER TABLE {PREFIX}suppress ADD COLUMN oldip varchar(64);
+UPDATE {PREFIX}suppress SET oldip = ip;
+ALTER TABLE {PREFIX}suppress DROP ip;
+ALTER TABLE {PREFIX}suppress ADD COLUMN ip varchar(64);
+UPDATE {PREFIX}suppress SET ip = oldip;
+ALTER TABLE {PREFIX}suppress DROP COLUMN oldip;
diff --git a/sql/db_update_1.2-alpha3_1.2_alpha4_sqlite.sql b/sql/db_update_1.2-alpha3_1.2_alpha4_sqlite.sql
new file mode 100644 (file)
index 0000000..e69de29