move the instance stuff to abook where it belongs

This commit is contained in:
redmatrix 2015-12-05 13:24:58 -08:00
parent 61aa33af1d
commit 36ef1d1bc6
4 changed files with 11 additions and 2 deletions

View File

@ -51,7 +51,7 @@ define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'H'
define ( 'STD_VERSION', '1.0' ); define ( 'STD_VERSION', '1.0' );
define ( 'ZOT_REVISION', 1 ); define ( 'ZOT_REVISION', 1 );
define ( 'DB_UPDATE_VERSION', 1160 ); define ( 'DB_UPDATE_VERSION', 1161 );
/** /**

View File

@ -23,6 +23,7 @@ CREATE TABLE IF NOT EXISTS `abook` (
`abook_profile` char(64) NOT NULL DEFAULT '', `abook_profile` char(64) NOT NULL DEFAULT '',
`abook_incl` TEXT NOT NULL DEFAULT '', `abook_incl` TEXT NOT NULL DEFAULT '',
`abook_excl` TEXT NOT NULL DEFAULT '', `abook_excl` TEXT NOT NULL DEFAULT '',
`abook_instance` TEXT NOT NULL DEFAULT '',
PRIMARY KEY (`abook_id`), PRIMARY KEY (`abook_id`),
KEY `abook_account` (`abook_account`), KEY `abook_account` (`abook_account`),
KEY `abook_channel` (`abook_channel`), KEY `abook_channel` (`abook_channel`),

View File

@ -22,6 +22,7 @@ CREATE TABLE "abook" (
"abook_profile" char(64) NOT NULL DEFAULT '', "abook_profile" char(64) NOT NULL DEFAULT '',
"abook_incl" TEXT NOT NULL DEFAULT '', "abook_incl" TEXT NOT NULL DEFAULT '',
"abook_excl" TEXT NOT NULL DEFAULT '', "abook_excl" TEXT NOT NULL DEFAULT '',
"abook_instance" TEXT NOT NULL DEFAULT '',
PRIMARY KEY ("abook_id") PRIMARY KEY ("abook_id")
); );
create index "abook_account" on abook ("abook_account"); create index "abook_account" on abook ("abook_account");

View File

@ -1,6 +1,6 @@
<?php <?php
define( 'UPDATE_VERSION' , 1160 ); define( 'UPDATE_VERSION' , 1161 );
/** /**
* *
@ -1950,3 +1950,10 @@ function update_r1159() {
} }
function update_r1160() {
$r1 = q("alter table abook add abook_instance text not null default '' ");
if($r)
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}