app DB structure
This commit is contained in:
parent
9e95458ea5
commit
28e8a1d2d3
14
boot.php
14
boot.php
@ -47,7 +47,7 @@ define ( 'RED_PLATFORM', 'Red Matrix' );
|
|||||||
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
|
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
|
||||||
define ( 'ZOT_REVISION', 1 );
|
define ( 'ZOT_REVISION', 1 );
|
||||||
|
|
||||||
define ( 'DB_UPDATE_VERSION', 1107 );
|
define ( 'DB_UPDATE_VERSION', 1108 );
|
||||||
|
|
||||||
define ( 'EOL', '<br />' . "\r\n" );
|
define ( 'EOL', '<br />' . "\r\n" );
|
||||||
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
||||||
@ -397,12 +397,11 @@ define ( 'XCHAN_FLAGS_DELETED', 0x1000);
|
|||||||
* Traficlights for Administration of HubLoc
|
* Traficlights for Administration of HubLoc
|
||||||
* to detect problems in inter server communication
|
* to detect problems in inter server communication
|
||||||
*/
|
*/
|
||||||
define ('HUBLOC_NOTUSED', 0x0000);
|
define ('HUBLOC_NOTUSED', 0x0000);
|
||||||
define ('HUBLOC_SEND_ERROR', 0x0001);
|
define ('HUBLOC_SEND_ERROR', 0x0001);
|
||||||
define ('HUBLOC_RECEIVE_ERROR', 0x0002);
|
define ('HUBLOC_RECEIVE_ERROR', 0x0002);
|
||||||
define ('HUBLOC_WORKS', 0x0004);
|
define ('HUBLOC_WORKS', 0x0004);
|
||||||
define ('HUBLOC_OFFLINE', 0x0008);
|
define ('HUBLOC_OFFLINE', 0x0008);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tag/term types
|
* Tag/term types
|
||||||
@ -424,6 +423,7 @@ define ( 'TERM_OBJ_PROFILE', 3 );
|
|||||||
define ( 'TERM_OBJ_CHANNEL', 4 );
|
define ( 'TERM_OBJ_CHANNEL', 4 );
|
||||||
define ( 'TERM_OBJ_OBJECT', 5 );
|
define ( 'TERM_OBJ_OBJECT', 5 );
|
||||||
define ( 'TERM_OBJ_THING', 6 );
|
define ( 'TERM_OBJ_THING', 6 );
|
||||||
|
define ( 'TERM_OBJ_APP', 7 );
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -82,6 +82,28 @@ CREATE TABLE IF NOT EXISTS `addon` (
|
|||||||
KEY `installed` (`installed`)
|
KEY `installed` (`installed`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `app` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`app_id` char(64) NOT NULL DEFAULT '',
|
||||||
|
`app_sig` char(255) NOT NULL DEFAULT '',
|
||||||
|
`app_author` char(255) NOT NULL DEFAULT '',
|
||||||
|
`app_name` char(255) NOT NULL DEFAULT '',
|
||||||
|
`app_desc` text NOT NULL,
|
||||||
|
`app_url` char(255) NOT NULL DEFAULT '',
|
||||||
|
`app_photo` char(255) NOT NULL DEFAULT '',
|
||||||
|
`app_version` char(255) NOT NULL DEFAULT '',
|
||||||
|
`app_channel` int(11) NOT NULL DEFAULT '0',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `app_id` (`app_id`),
|
||||||
|
KEY `app_name` (`app_name`),
|
||||||
|
KEY `app_url` (`app_url`),
|
||||||
|
KEY `app_photo` (`app_photo`),
|
||||||
|
KEY `app_version` (`app_version`),
|
||||||
|
KEY `app_channel` (`app_channel`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `attach` (
|
CREATE TABLE IF NOT EXISTS `attach` (
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`aid` int(10) unsigned NOT NULL DEFAULT '0',
|
`aid` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
define( 'UPDATE_VERSION' , 1107 );
|
define( 'UPDATE_VERSION' , 1108 );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1189,3 +1189,28 @@ function update_r1106() {
|
|||||||
return UPDATE_FAILED;
|
return UPDATE_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function update_r1107() {
|
||||||
|
$r = q("CREATE TABLE IF NOT EXISTS `app` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`app_id` char(64) NOT NULL DEFAULT '',
|
||||||
|
`app_sig` char(255) NOT NULL DEFAULT '',
|
||||||
|
`app_author` char(255) NOT NULL DEFAULT '',
|
||||||
|
`app_name` char(255) NOT NULL DEFAULT '',
|
||||||
|
`app_desc` text NOT NULL,
|
||||||
|
`app_url` char(255) NOT NULL DEFAULT '',
|
||||||
|
`app_photo` char(255) NOT NULL DEFAULT '',
|
||||||
|
`app_version` char(255) NOT NULL DEFAULT '',
|
||||||
|
`app_channel` int(11) NOT NULL DEFAULT '0',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `app_id` (`app_id`),
|
||||||
|
KEY `app_name` (`app_name`),
|
||||||
|
KEY `app_url` (`app_url`),
|
||||||
|
KEY `app_photo` (`app_photo`),
|
||||||
|
KEY `app_version` (`app_version`),
|
||||||
|
KEY `app_channel` (`app_channel`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ");
|
||||||
|
|
||||||
|
if($r)
|
||||||
|
return UPDATE_SUCCESS;
|
||||||
|
return UPDATE_FAILED;
|
||||||
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
2014-05-16.677
|
2014-05-17.678
|
||||||
|
Reference in New Issue
Block a user