-- ------------------------------------------
-- Friendica 3.6-dev (Asparagus)
--- DB_UPDATE_VERSION 1239
+-- DB_UPDATE_VERSION 1241
-- ------------------------------------------
--
CREATE TABLE IF NOT EXISTS `oembed` (
`url` varbinary(255) NOT NULL,
+ `maxwidth` int(11) NOT NULL,
`content` mediumtext,
`created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
- PRIMARY KEY(`url`),
+ PRIMARY KEY(`url`,`maxwidth`),
INDEX `created` (`created`)
) DEFAULT COLLATE utf8mb4_general_ci;
INDEX `created` (`created`)
) DEFAULT COLLATE utf8mb4_general_ci;
+--
+-- TABLE participation
+--
+CREATE TABLE IF NOT EXISTS `participation` (
+ `iid` int(10) unsigned NOT NULL,
+ `server` varchar(60) NOT NULL,
+ `cid` int(10) unsigned NOT NULL,
+ PRIMARY KEY(`iid`,`server`)
+) DEFAULT COLLATE utf8mb4_general_ci;
+
--
-- TABLE pconfig
--
);
$database["participation"] = array(
"fields" => array(
- "item" => array("type" => "int(10) unsigned", "not null" => "1", "primary" => "1", "relation" => array("item" => "id")),
- "contact" => array("type" => "int(10) unsigned", "not null" => "1", "relation" => array("contact" => "id")),
+ "iid" => array("type" => "int(10) unsigned", "not null" => "1", "primary" => "1", "relation" => array("item" => "id")),
"server" => array("type" => "varchar(60)", "not null" => "1", "primary" => "1"),
+ "cid" => array("type" => "int(10) unsigned", "not null" => "1", "relation" => array("contact" => "id")),
),
"indexes" => array(
- "PRIMARY" => array("item", "server")
+ "PRIMARY" => array("iid", "server")
)
);
$database["pconfig"] = array(
{
$r = dba::p("SELECT `contact`.`batch`, `contact`.`id`, `contact`.`name`, `contact`.`network`,
`fcontact`.`batch` AS `fbatch`, `fcontact`.`network` AS `fnetwork` FROM `participation`
- INNER JOIN `contact` ON `contact`.`id` = `participation`.`contact`
+ INNER JOIN `contact` ON `contact`.`id` = `participation`.`cid`
LEFT JOIN `fcontact` ON `fcontact`.`url` = `contact`.`url`
- WHERE `participation`.`item` = ?", $thread);
+ WHERE `participation`.`iid` = ?", $thread);
while ($contact = dba::fetch($r)) {
if (!empty($contact['fnetwork'])) {