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.php10
3 files changed, 14 insertions, 2 deletions
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql
index 247b33814..da78d9c61 100644
--- a/install/schema_mysql.sql
+++ b/install/schema_mysql.sql
@@ -1256,6 +1256,7 @@ CREATE TABLE IF NOT EXISTS `site` (
`site_sellpage` char(255) NOT NULL DEFAULT '',
`site_location` char(255) NOT NULL DEFAULT '',
`site_realm` char(255) NOT NULL DEFAULT '',
+ `site_valid` smallint NOT NULL DEFAULT '0',
PRIMARY KEY (`site_url`),
KEY `site_flags` (`site_flags`),
KEY `site_update` (`site_update`),
@@ -1264,7 +1265,8 @@ CREATE TABLE IF NOT EXISTS `site` (
KEY `site_access` (`site_access`),
KEY `site_sellpage` (`site_sellpage`),
KEY `site_pull` (`site_pull`),
- KEY `site_realm` (`site_realm`)
+ KEY `site_realm` (`site_realm`),
+ KEY `site_valid` (`site_valid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql
index d852f38e9..1370f3b8a 100644
--- a/install/schema_postgres.sql
+++ b/install/schema_postgres.sql
@@ -959,6 +959,7 @@ CREATE TABLE "site" (
"site_sellpage" text NOT NULL DEFAULT '',
"site_location" text NOT NULL DEFAULT '',
"site_realm" text NOT NULL DEFAULT '',
+ "site_valid" smallint NOT NULL DEFAULT '0',
PRIMARY KEY ("site_url")
);
create index "site_flags" on site ("site_flags");
@@ -968,6 +969,7 @@ create index "site_register" on site ("site_register");
create index "site_access" on site ("site_access");
create index "site_sellpage" on site ("site_sellpage");
create index "site_realm" on site ("site_realm");
+create index "site_valid" on site ("site_valid");
CREATE TABLE "source" (
"src_id" serial NOT NULL,
diff --git a/install/update.php b/install/update.php
index 86731e165..ee13bee78 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1137 );
+define( 'UPDATE_VERSION' , 1138 );
/**
*
@@ -1568,3 +1568,11 @@ function update_r1136() {
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}
+
+function update_r1137() {
+ $r1 = q("alter table site add site_valid smallint not null default '0' ");
+ $r2 = q("create index site_valid on site ( site_valid ) ");
+ if($r1 && $r2)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}