diff options
author | friendica <info@friendica.com> | 2013-09-26 16:25:28 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-09-26 16:25:28 -0700 |
commit | edc5566f79c94f7ad994eccc7a8bb0e586961cf4 (patch) | |
tree | 2700d1f415e550a9f2aad009cd0a5eafd1ec9f2e /install | |
parent | 6519433301a571d8e12ffa24b56534bb2e3afe5f (diff) | |
download | volse-hubzilla-edc5566f79c94f7ad994eccc7a8bb0e586961cf4.tar.gz volse-hubzilla-edc5566f79c94f7ad994eccc7a8bb0e586961cf4.tar.bz2 volse-hubzilla-edc5566f79c94f7ad994eccc7a8bb0e586961cf4.zip |
structure for channel unions
Diffstat (limited to 'install')
-rw-r--r-- | install/database.sql | 12 | ||||
-rw-r--r-- | install/update.php | 18 |
2 files changed, 29 insertions, 1 deletions
diff --git a/install/database.sql b/install/database.sql index 44e211630..c92428975 100644 --- a/install/database.sql +++ b/install/database.sql @@ -835,6 +835,18 @@ CREATE TABLE IF NOT EXISTS `site` ( KEY `site_sellpage` (`site_sellpage`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `source` ( + `src_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `src_channel_id` int(10) unsigned NOT NULL DEFAULT '0', + `src_channel_xchan` char(255) NOT NULL DEFAULT '', + `src_xchan` char(255) NOT NULL DEFAULT '', + `src_patt` mediumtext NOT NULL, + PRIMARY KEY (`src_id`), + KEY `src_channel_id` (`src_channel_id`), + KEY `src_channel_xchan` (`src_channel_xchan`), + KEY `src_xchan` (`src_xchan`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + CREATE TABLE IF NOT EXISTS `spam` ( `id` int(11) NOT NULL AUTO_INCREMENT, `uid` int(11) NOT NULL, diff --git a/install/update.php b/install/update.php index d2d6a0cb7..13f4fc63b 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1073 ); +define( 'UPDATE_VERSION' , 1074 ); /** * @@ -820,3 +820,19 @@ ADD INDEX ( `xtag_flags` ) "); return UPDATE_SUCCESS; return UPDATE_FAILED; } + +function update_r1073() { + $r1 = q("CREATE TABLE IF NOT EXISTS `source` ( +`src_id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , +`src_channel_id` INT UNSIGNED NOT NULL DEFAULT '0', +`src_channel_xchan` CHAR( 255 ) NOT NULL DEFAULT '', +`src_xchan` CHAR( 255 ) NOT NULL DEFAULT '', +`src_patt` MEDIUMTEXT NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=utf8 "); + + $r2 = q("ALTER TABLE `source` ADD INDEX ( `src_channel_id` ), ADD INDEX ( `src_channel_xchan` ), ADD INDEX ( `src_xchan` ) "); + + if($r1 && $r2) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} |