]> git.mjollnir.org Git - s9y.git/commitdiff
allow longer author names, db update.
authorgarvinhicking <garvinhicking>
Fri, 12 Jan 2007 08:13:36 +0000 (08:13 +0000)
committergarvinhicking <garvinhicking>
Fri, 12 Jan 2007 08:13:36 +0000 (08:13 +0000)
docs/NEWS
serendipity_config.inc.php
sql/db.sql
sql/db_update_1.2-alpha1_1.2_alpha2_mysql.sql [new file with mode: 0644]
sql/db_update_1.2-alpha1_1.2_alpha2_postgres.sql [new file with mode: 0644]
sql/db_update_1.2-alpha1_1.2_alpha2_sqlite.sql [new file with mode: 0644]

index 9eb9946214dd4a40663cb348f2a6a0d1407cbc4f..3c02e4e0867ab2a6c4275e3c479672c36394ba22 100644 (file)
--- 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)
 
index 283495c7145a008ff8d9d60d124aa74e2cc7cbab..8b9c0ec7c58c115874112da718b8df241596aec6 100644 (file)
@@ -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);
index 76d0a2fb032b1e58fe92170fc67d92e35d0731a7..5fc651aa4ec0181a04afa98356ce73c77a6b5997 100644 (file)
@@ -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 (file)
index 0000000..21935e8
--- /dev/null
@@ -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 (file)
index 0000000..87ff0ba
--- /dev/null
@@ -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 (file)
index 0000000..e69de29