summaryrefslogtreecommitdiff
path: root/database
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-04-30 18:16:38 +0000
committerDries Buytaert <dries@buytaert.net>2005-04-30 18:16:38 +0000
commita93cf8966592f3999ddec04722cd08b0a1aaad1c (patch)
tree0f8e85f349c68a139f115ce9fe260ccfa40b59a2 /database
parenta10eac3291d14ae9437e8f34229b1fde599e8f64 (diff)
downloadbrdo-a93cf8966592f3999ddec04722cd08b0a1aaad1c.tar.gz
brdo-a93cf8966592f3999ddec04722cd08b0a1aaad1c.tar.bz2
- Patch #21353 by chx: implemented PHP-mode for blocks.
Diffstat (limited to 'database')
-rw-r--r--database/database.mysql3
-rw-r--r--database/database.pgsql3
-rw-r--r--database/updates.inc14
3 files changed, 15 insertions, 5 deletions
diff --git a/database/database.mysql b/database/database.mysql
index aa6743c16..bed79dab5 100644
--- a/database/database.mysql
+++ b/database/database.mysql
@@ -126,8 +126,7 @@ CREATE TABLE blocks (
custom tinyint(2) DEFAULT '0' NOT NULL,
throttle tinyint(1) DEFAULT '0' NOT NULL,
visibility tinyint(1) DEFAULT '0' NOT NULL,
- pages text NOT NULL,
- types text NOT NULL
+ pages text NOT NULL
) TYPE=MyISAM;
--
diff --git a/database/database.pgsql b/database/database.pgsql
index f22d92237..e3c4fea13 100644
--- a/database/database.pgsql
+++ b/database/database.pgsql
@@ -124,8 +124,7 @@ CREATE TABLE blocks (
custom smallint NOT NULL default '0',
throttle smallint NOT NULL default '0',
visibility smallint NOT NULL default '0',
- pages text NOT NULL default '',
- types text NOT NULL default ''
+ pages text NOT NULL default ''
);
--
diff --git a/database/updates.inc b/database/updates.inc
index 6874bd72c..e1e33734e 100644
--- a/database/updates.inc
+++ b/database/updates.inc
@@ -109,7 +109,8 @@ $sql_updates = array(
"2005-04-10" => "update_130",
"2005-04-11" => "update_131",
"2005-04-14" => "update_132",
- "2005-04-24" => "update_133"
+ "2005-04-24" => "update_133",
+ "2005-04-30" => "update_134"
);
function update_32() {
@@ -2425,6 +2426,17 @@ function update_133() {
return $ret;
}
+function update_134() {
+ if ($GLOBALS['db_type'] == 'mysql') {
+ $ret[] = update_sql('ALTER TABLE {blocks} DROP types');
+ }
+ else {
+ // Postgres can only drop columns since 7.4
+ #$ret[] = update_sql('ALTER TABLE {blocks} DROP types');
+ }
+ return $ret;
+}
+
function update_sql($sql) {
$edit = $_POST["edit"];
$result = db_query($sql);