aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
Diffstat (limited to 'install')
-rw-r--r--install/schema_mysql.sql4
-rw-r--r--install/schema_postgres.sql2
-rw-r--r--install/update.php14
3 files changed, 17 insertions, 3 deletions
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql
index bb6ad24a2..693cad1a8 100644
--- a/install/schema_mysql.sql
+++ b/install/schema_mysql.sql
@@ -550,10 +550,12 @@ CREATE TABLE IF NOT EXISTS `iconfig` (
`cat` char(255) NOT NULL DEFAULT '',
`k` char(255) NOT NULL DEFAULT '',
`v` mediumtext NOT NULL,
+ `sharing` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `iid` (`iid`),
KEY `cat` (`cat`),
- KEY `k` (`k`)
+ KEY `k` (`k`),
+ KEY `sharing` (`sharing`),
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `issue` (
diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql
index 2d9bffdec..964ca5966 100644
--- a/install/schema_postgres.sql
+++ b/install/schema_postgres.sql
@@ -544,11 +544,13 @@ CREATE TABLE "iconfig" (
"cat" text NOT NULL DEFAULT '',
"k" text NOT NULL DEFAULT '',
"v" text NOT NULL DEFAULT '',
+ "sharing" int NOT NULL DEFAULT '0',
PRIMARY_KEY("id")
);
create index "iconfig_iid" on iconfig ("iid");
create index "iconfig_cat" on iconfig ("cat");
create index "iconfig_k" on iconfig ("k");
+create index "iconfig_sharing" on iconfig ("sharing");
CREATE TABLE "issue" (
"issue_id" serial NOT NULL,
"issue_created" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00',
diff --git a/install/update.php b/install/update.php
index e96bda03c..d21295be7 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1162 );
+define( 'UPDATE_VERSION' , 1163 );
/**
*
@@ -1971,7 +1971,6 @@ function update_r1161() {
$r2 = q("create index \"iconfig_iid\" on iconfig (\"iid\") ");;
$r3 = q("create index \"iconfig_cat\" on iconfig (\"cat\") ");
$r4 = q("create index \"iconfig_k\" on iconfig (\"k\") ");
-
$r = $r1 && $r2 && $r3 && $r4;
}
else {
@@ -1994,3 +1993,14 @@ $r4 = q("create index \"iconfig_k\" on iconfig (\"k\") ");
return UPDATE_FAILED;
}
+function update_r1162() {
+ $r1 = q("alter table iconfig add sharing int not null default '0' ");
+
+ if(ACTIVE_DBTYPE == DBTYPE_POSTGRES)
+ $r2 = q("create index \"iconfig_sharing\" on iconfig (\"sharing\") ");
+ else
+ $r2 = q("alter table iconfig add index ( sharing ) ");
+ if($r1 && $r2)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+} \ No newline at end of file