summaryrefslogtreecommitdiff
path: root/database/updates.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-11-05 08:00:20 +0000
committerDries Buytaert <dries@buytaert.net>2005-11-05 08:00:20 +0000
commit54e13b5fb421917ff4ebfeb65c85d61a8ae663b8 (patch)
tree1d4ad21fbf09f73d9ce4044df246271e9d8203a5 /database/updates.inc
parent745b7beda8c0d195aace8c5df17a8ff8548ad7b3 (diff)
downloadbrdo-54e13b5fb421917ff4ebfeb65c85d61a8ae663b8.tar.gz
brdo-54e13b5fb421917ff4ebfeb65c85d61a8ae663b8.tar.bz2
- Patch #27140 by m3averck/souvent22: can't delete contact module subjects with '&' in title.
Diffstat (limited to 'database/updates.inc')
-rw-r--r--database/updates.inc19
1 files changed, 19 insertions, 0 deletions
diff --git a/database/updates.inc b/database/updates.inc
index eb622abd8..f7ea33041 100644
--- a/database/updates.inc
+++ b/database/updates.inc
@@ -103,6 +103,7 @@ $sql_updates = array(
"2005-10-15" => "update_150",
"2005-10-23" => "update_151",
"2005-10-28" => "update_152",
+ "2005-11-03" => "update_153"
);
function update_110() {
@@ -1119,6 +1120,24 @@ function update_152() {
return $ret;
}
+function update_153(){
+ $ret = array();
+ switch ($GLOBALS['db_type']) {
+ case 'pgsql':
+ $ret[] = update_sql("ALTER TABLE {contact} DROP CONSTRAINT {contact}_pkey category");
+ $ret[] = update_sql("ALTER TABLE {contact} ADD COLUMN cid int PRIMARY KEY");
+ $ret[] = update_sql("ALTER TABLE {contact} ADD UNIQUE (category)");
+ case 'mysql':
+ case 'mysqli':
+ $ret[] = update_sql("ALTER TABLE {contact} DROP PRIMARY KEY");
+ $ret[] = update_sql("ALTER TABLE {contact} ADD COLUMN cid int(11) NOT NULL PRIMARY KEY auto_increment");
+ $ret[] = update_sql("ALTER TABLE {contact} ADD UNIQUE KEY category (category)");
+ }
+ $ret = array();
+
+}
+
+
/**
* Adds a column to a database. Uses syntax appropriate for PostgreSQL.