support commerical apps

This commit is contained in:
friendica 2014-05-18 02:21:06 -07:00
parent 2b44af4455
commit 68ca4ef19e
3 changed files with 18 additions and 3 deletions

View File

@ -47,7 +47,7 @@ define ( 'RED_PLATFORM', 'Red Matrix' );
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
define ( 'ZOT_REVISION', 1 );
define ( 'DB_UPDATE_VERSION', 1108 );
define ( 'DB_UPDATE_VERSION', 1109 );
define ( 'EOL', '<br />' . "\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );

View File

@ -94,13 +94,17 @@ CREATE TABLE IF NOT EXISTS `app` (
`app_photo` char(255) NOT NULL DEFAULT '',
`app_version` char(255) NOT NULL DEFAULT '',
`app_channel` int(11) NOT NULL DEFAULT '0',
`app_addr` char(255) NOT NULL DEFAULT '',
`app_price` char(255) NOT NULL DEFAULT '',
`app_page` char(255) NOT NULL DEFAULT '',
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`)
KEY `app_channel` (`app_channel`),
KEY `app_price` (`app_price`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

View File

@ -1,6 +1,6 @@
<?php
define( 'UPDATE_VERSION' , 1108 );
define( 'UPDATE_VERSION' , 1109 );
/**
*
@ -1214,3 +1214,14 @@ function update_r1107() {
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}
function update_r11108() {
$r = q("ALTER TABLE `app` ADD `app_addr` CHAR( 255 ) NOT NULL DEFAULT '',
ADD `app_price` CHAR( 255 ) NOT NULL DEFAULT '',
ADD `app_page` CHAR( 255 ) NOT NULL DEFAULT '',
ADD INDEX ( `app_price` )");
if($r)
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}