diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-10-19 16:07:14 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-10-19 16:07:14 -0700 |
commit | 57e0bfc5a9d03c6e1f2d8708daf59ecdba0a7ad0 (patch) | |
tree | ceb880c1954a20332450b247f717073c592f87fa /install | |
parent | b49972a623ae8f021899e2732031ba585b79a4ac (diff) | |
download | volse-hubzilla-57e0bfc5a9d03c6e1f2d8708daf59ecdba0a7ad0.tar.gz volse-hubzilla-57e0bfc5a9d03c6e1f2d8708daf59ecdba0a7ad0.tar.bz2 volse-hubzilla-57e0bfc5a9d03c6e1f2d8708daf59ecdba0a7ad0.zip |
add the project name to site info packet
Diffstat (limited to 'install')
-rw-r--r-- | install/schema_mysql.sql | 4 | ||||
-rw-r--r-- | install/schema_postgres.sql | 2 | ||||
-rw-r--r-- | install/update.php | 12 |
3 files changed, 16 insertions, 2 deletions
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql index 397848e9e..ddc38486c 100644 --- a/install/schema_mysql.sql +++ b/install/schema_mysql.sql @@ -1280,6 +1280,7 @@ CREATE TABLE IF NOT EXISTS `site` ( `site_realm` char(255) NOT NULL DEFAULT '', `site_valid` smallint NOT NULL DEFAULT '0', `site_dead` smallint NOT NULL DEFAULT '0', + `site_project` char(255) NOT NULL DEFAULT '', PRIMARY KEY (`site_url`), KEY `site_flags` (`site_flags`), KEY `site_update` (`site_update`), @@ -1290,7 +1291,8 @@ CREATE TABLE IF NOT EXISTS `site` ( KEY `site_pull` (`site_pull`), KEY `site_realm` (`site_realm`), KEY `site_valid` (`site_valid`), - KEY `site_dead` (`site_dead`) + KEY `site_dead` (`site_dead`), + KEY `site_project` (`site_project`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql index 0b8ed52dc..1f9ce753f 100644 --- a/install/schema_postgres.sql +++ b/install/schema_postgres.sql @@ -983,6 +983,7 @@ CREATE TABLE "site" ( "site_realm" text NOT NULL DEFAULT '', "site_valid" smallint NOT NULL DEFAULT '0', "site_dead" smallint NOT NULL DEFAULT '0', + "site_project" text NOT NULL DEFAULT '', PRIMARY KEY ("site_url") ); create index "site_flags" on site ("site_flags"); @@ -994,6 +995,7 @@ 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 index "site_dead" on site ("site_dead"); +create index "site_project" on site ("site_project"); CREATE TABLE "source" ( "src_id" serial NOT NULL, diff --git a/install/update.php b/install/update.php index ffea36d54..cc8dc6ae5 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1157 ); +define( 'UPDATE_VERSION' , 1158 ); /** * @@ -1774,3 +1774,13 @@ function update_r1155() { function update_r1156() { return UPDATE_SUCCESS; } + +function update_r1157() { + $r1 = q("alter table site add site_project char(255) not null default '' "); + $r2 = q("create index site_project on site ( site_project ) "); + if($r1 && $r2) + return UPDATE_SUCCESS; + return UPDATE_FAILED; + +} + |