diff options
author | Thomas Willingham <founder@kakste.com> | 2014-05-19 02:05:22 +0100 |
---|---|---|
committer | Thomas Willingham <founder@kakste.com> | 2014-05-19 02:05:22 +0100 |
commit | b06fd69da84626c1e8c1d8b5dbda6f181027a782 (patch) | |
tree | fe41d73b793204038d8a6d228d18a53780bdf6ec /install | |
parent | 9397f2dff6d9d8ee7a2c93bb952c0c216881da3f (diff) | |
parent | 68ca4ef19e0617904d8557e95ec74d09af833d00 (diff) | |
download | volse-hubzilla-b06fd69da84626c1e8c1d8b5dbda6f181027a782.tar.gz volse-hubzilla-b06fd69da84626c1e8c1d8b5dbda6f181027a782.tar.bz2 volse-hubzilla-b06fd69da84626c1e8c1d8b5dbda6f181027a782.zip |
Merge branch 'master' of https://github.com/friendica/red
Diffstat (limited to 'install')
-rw-r--r-- | install/database.sql | 26 | ||||
-rw-r--r-- | install/update.php | 38 |
2 files changed, 63 insertions, 1 deletions
diff --git a/install/database.sql b/install/database.sql index a5094b8e1..0de5879a2 100644 --- a/install/database.sql +++ b/install/database.sql @@ -82,6 +82,32 @@ CREATE TABLE IF NOT EXISTS `addon` ( KEY `installed` (`installed`) ) 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', + `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_price` (`app_price`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + + CREATE TABLE IF NOT EXISTS `attach` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `aid` int(10) unsigned NOT NULL DEFAULT '0', diff --git a/install/update.php b/install/update.php index d497cda70..561070ba4 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1107 ); +define( 'UPDATE_VERSION' , 1109 ); /** * @@ -1189,3 +1189,39 @@ function update_r1106() { 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; +} + + +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; +} |