summaryrefslogtreecommitdiff
path: root/database
diff options
context:
space:
mode:
Diffstat (limited to 'database')
-rw-r--r--database/database.pgsql6
-rw-r--r--database/updates.inc38
2 files changed, 29 insertions, 15 deletions
diff --git a/database/database.pgsql b/database/database.pgsql
index 92f5dc0b7..54a1426fb 100644
--- a/database/database.pgsql
+++ b/database/database.pgsql
@@ -573,7 +573,7 @@ CREATE INDEX search_index_word_idx ON search_index(word);
CREATE TABLE search_total (
word varchar(50) NOT NULL default '',
- count integer default NULL
+ count float default NULL
);
CREATE INDEX search_total_word_idx ON search_total(word);
@@ -794,10 +794,10 @@ INSERT INTO variable(name,value) VALUES('theme_default','s:10:"bluemarine";');
INSERT INTO users(uid,name,mail) VALUES(0,'','');
INSERT INTO users_roles(uid,rid) VALUES(0, 1);
-INSERT INTO role (rid, name) VALUES (1, 'anonymous user');
+INSERT INTO role (name) VALUES ('anonymous user');
INSERT INTO permission VALUES (1,'access content',0);
-INSERT INTO role (rid, name) VALUES (2, 'authenticated user');
+INSERT INTO role (name) VALUES ('authenticated user');
INSERT INTO permission VALUES (2,'access comments, access content, post comments, post comments without approval',0);
INSERT INTO blocks(module,delta,status) VALUES('user', 0, 1);
diff --git a/database/updates.inc b/database/updates.inc
index bc7785905..4aed4ee69 100644
--- a/database/updates.inc
+++ b/database/updates.inc
@@ -107,7 +107,8 @@ $sql_updates = array(
"2005-03-21" => "update_128",
"2005-04-08: first update since Drupal 4.6.0 release" => "update_129",
"2005-04-10" => "update_130",
- "2005-04-11" => "update_131"
+ "2005-04-11" => "update_131",
+ "2005-04-14" => "update_132"
);
function update_32() {
@@ -2329,17 +2330,6 @@ function update_127() {
return $ret;
}
-function update_sql($sql) {
- $edit = $_POST["edit"];
- $result = db_query($sql);
- if ($result) {
- return array('1', nl2br(htmlentities($sql)) ." ", "<div style=\"color: green;\">OK</div>\n");
- }
- else {
- return array('0', nl2br(htmlentities($sql)) ." ", "<div style=\"color: red;\">FAILED</div>\n");
- }
-}
-
function update_128() {
$ret = array();
@@ -2391,4 +2381,28 @@ function update_131() {
return $ret;
}
+
+function update_132() {
+ /**
+ * PostgreSQL only update.
+ */
+ $ret = array();
+
+ if ($GLOBALS['db_type'] == 'pgsql') {
+ $ret[] = update_sql('DROP TABLE {search_total}');
+ $ret[] = update_sql("CREATE TABLE {search_total} (
+ word varchar(50) NOT NULL default '',
+ count float default NULL)");
+ $ret[] = update_sql('CREATE INDEX {search_total}_word_idx ON {search_total}(word)');
+
+ /**
+ * Wipe the search index
+ */
+ include_once('modules/search.module');
+ search_wipe();
+ }
+
+ return $ret;
+}
+
?>