From 5b55ba0939a8323abb3dbffb7fd6c90b363687d8 Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Fri, 12 Jan 2007 08:13:36 +0000 Subject: [PATCH] allow longer author names, db update. --- docs/NEWS | 2 ++ serendipity_config.inc.php | 2 +- sql/db.sql | 2 +- sql/db_update_1.2-alpha1_1.2_alpha2_mysql.sql | 1 + sql/db_update_1.2-alpha1_1.2_alpha2_postgres.sql | 7 +++++++ sql/db_update_1.2-alpha1_1.2_alpha2_sqlite.sql | 0 6 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 sql/db_update_1.2-alpha1_1.2_alpha2_mysql.sql create mode 100644 sql/db_update_1.2-alpha1_1.2_alpha2_postgres.sql create mode 100644 sql/db_update_1.2-alpha1_1.2_alpha2_sqlite.sql diff --git a/docs/NEWS b/docs/NEWS index 9eb99462..3c02e4e0 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,8 @@ Version 1.2 () ------------------------------------------------------------------------ + * Upgraded DB-scheme to allow longer author usernames + * Improved Spamblock plugin to allow filtering email addresses (Boris) diff --git a/serendipity_config.inc.php b/serendipity_config.inc.php index 283495c7..8b9c0ec7 100644 --- a/serendipity_config.inc.php +++ b/serendipity_config.inc.php @@ -31,7 +31,7 @@ if (!defined('IN_serendipity')) { include(S9Y_INCLUDE_PATH . 'include/compat.inc.php'); // The version string -$serendipity['version'] = '1.2-alpha1'; +$serendipity['version'] = '1.2-alpha2'; // 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); diff --git a/sql/db.sql b/sql/db.sql index 76d0a2fb..5fc651aa 100644 --- a/sql/db.sql +++ b/sql/db.sql @@ -13,7 +13,7 @@ create table {PREFIX}authors ( realname varchar(255) NOT NULL default '', - username varchar(20) default null, + username varchar(32) default null, password varchar(32) default null, authorid {AUTOINCREMENT} {PRIMARY}, mail_comments int(1) default '1', diff --git a/sql/db_update_1.2-alpha1_1.2_alpha2_mysql.sql b/sql/db_update_1.2-alpha1_1.2_alpha2_mysql.sql new file mode 100644 index 00000000..21935e8e --- /dev/null +++ b/sql/db_update_1.2-alpha1_1.2_alpha2_mysql.sql @@ -0,0 +1 @@ +ALTER TABLE {PREFIX}authors CHANGE username username VARCHAR(32) NOT NULL; diff --git a/sql/db_update_1.2-alpha1_1.2_alpha2_postgres.sql b/sql/db_update_1.2-alpha1_1.2_alpha2_postgres.sql new file mode 100644 index 00000000..87ff0bae --- /dev/null +++ b/sql/db_update_1.2-alpha1_1.2_alpha2_postgres.sql @@ -0,0 +1,7 @@ +ALTER TABLE {PREFIX}authors ADD COLUMN oldusername varchar(32); +UPDATE {PREFIX}authors SET oldusername = username; +ALTER TABLE {PREFIX}authors DROP username; + +ALTER TABLE {PREFIX}authors ADD COLUMN username varchar(32); +UPDATE {PREFIX}authors SET username = oldusername; +ALTER TABLE {PREFIX}authors DROP COLUMN oldusername; diff --git a/sql/db_update_1.2-alpha1_1.2_alpha2_sqlite.sql b/sql/db_update_1.2-alpha1_1.2_alpha2_sqlite.sql new file mode 100644 index 00000000..e69de29b