mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 04:45:16 +02:00
[Database version 1402] Rework parsed_url table
- Allow arbitrary-sized URL - Use URL hash for primary key instead of truncated URL, requires table truncation pre update - Add expires field
This commit is contained in:
parent
1b90686fcd
commit
7de03eb13f
3 changed files with 23 additions and 8 deletions
|
@ -55,7 +55,7 @@
|
|||
use Friendica\Database\DBA;
|
||||
|
||||
if (!defined('DB_UPDATE_VERSION')) {
|
||||
define('DB_UPDATE_VERSION', 1402);
|
||||
define('DB_UPDATE_VERSION', 1403);
|
||||
}
|
||||
|
||||
return [
|
||||
|
@ -1019,15 +1019,18 @@ return [
|
|||
"parsed_url" => [
|
||||
"comment" => "cache for 'parse_url' queries",
|
||||
"fields" => [
|
||||
"url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "page url"],
|
||||
"url_hash" => ["type" => "binary(64)", "not null" => "1", "primary" => "1", "comment" => "page url hash"],
|
||||
"guessing" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the 'guessing' mode active?"],
|
||||
"oembed" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the data the result of oembed?"],
|
||||
"url" => ["type" => "text", "not null" => "1", "comment" => "page url"],
|
||||
"content" => ["type" => "mediumtext", "comment" => "page data"],
|
||||
"created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
|
||||
"expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of expiration"],
|
||||
],
|
||||
"indexes" => [
|
||||
"PRIMARY" => ["url", "guessing", "oembed"],
|
||||
"PRIMARY" => ["url_hash", "guessing", "oembed"],
|
||||
"created" => ["created"],
|
||||
"expires" => ["expires"],
|
||||
]
|
||||
],
|
||||
"pconfig" => [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue