From: Mikael Nordfeldth Date: Thu, 19 Feb 2015 19:50:40 +0000 (+0100) Subject: Merge branch 'utf8mb4' into nightly X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;ds=sidebyside;h=0590f2975e6c5b26bbe6121da5c49890e035721e;p=quix0rs-gnu-social.git Merge branch 'utf8mb4' into nightly Conflicts because of urlhash fixes: classes/File.php classes/File_redirection.php classes/File_thumbnail.php --- 0590f2975e6c5b26bbe6121da5c49890e035721e diff --cc classes/File.php index 716e1cc2c6,b42e1a674f..b4bf9f9a1f --- a/classes/File.php +++ b/classes/File.php @@@ -26,14 -26,13 +26,14 @@@ class File extends Managed_DataObjec { public $__table = 'file'; // table name public $id; // int(4) primary_key not_null - public $url; // varchar(191) unique_key not 255 because utf8mb4 takes more space + public $urlhash; // varchar(64) unique_key + public $url; // text public $mimetype; // varchar(50) public $size; // int(4) - public $title; // varchar(255) + public $title; // varchar(191) not 255 because utf8mb4 takes more space public $date; // int(4) public $protected; // int(4) - public $filename; // varchar(255) + public $filename; // varchar(191) not 255 because utf8mb4 takes more space public $width; // int(4) public $height; // int(4) public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP @@@ -45,14 -42,13 +45,14 @@@ return array( 'fields' => array( 'id' => array('type' => 'serial', 'not null' => true), - 'url' => array('type' => 'varchar', 'length' => 191, 'description' => 'destination URL after following redirections'), + 'urlhash' => array('type' => 'varchar', 'length' => 64, 'description' => 'sha256 of destination URL (url field)'), + 'url' => array('type' => 'text', 'description' => 'destination URL after following redirections'), 'mimetype' => array('type' => 'varchar', 'length' => 50, 'description' => 'mime type of resource'), 'size' => array('type' => 'int', 'description' => 'size of resource when available'), - 'title' => array('type' => 'varchar', 'length' => 255, 'description' => 'title of resource when available'), + 'title' => array('type' => 'varchar', 'length' => 191, 'description' => 'title of resource when available'), 'date' => array('type' => 'int', 'description' => 'date of resource according to http query'), 'protected' => array('type' => 'int', 'description' => 'true when URL is private (needs login)'), - 'filename' => array('type' => 'varchar', 'length' => 255, 'description' => 'if a local file, name of the file'), + 'filename' => array('type' => 'varchar', 'length' => 191, 'description' => 'if a local file, name of the file'), 'width' => array('type' => 'int', 'description' => 'width in pixels, if it can be described as such and data is available'), 'height' => array('type' => 'int', 'description' => 'height in pixels, if it can be described as such and data is available'), diff --cc classes/File_thumbnail.php index 02d42c41ff,af3551028e..609f1c34b8 --- a/classes/File_thumbnail.php +++ b/classes/File_thumbnail.php @@@ -27,8 -27,8 +27,8 @@@ class File_thumbnail extends Managed_Da { public $__table = 'file_thumbnail'; // table name public $file_id; // int(4) primary_key not_null - public $url; // varchar(191) unique_key not 255 because utf8mb4 takes more space + public $url; // text - public $filename; // varchar(255) + public $filename; // varchar(191) not 255 because utf8mb4 takes more space public $width; // int(4) primary_key public $height; // int(4) primary_key public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP @@@ -38,8 -38,8 +38,8 @@@ return array( 'fields' => array( 'file_id' => array('type' => 'int', 'not null' => true, 'description' => 'thumbnail for what URL/file'), - 'url' => array('type' => 'varchar', 'length' => 191, 'description' => 'URL of thumbnail'), + 'url' => array('type' => 'text', 'description' => 'URL of thumbnail'), - 'filename' => array('type' => 'varchar', 'length' => 255, 'description' => 'if stored locally, filename is put here'), + 'filename' => array('type' => 'varchar', 'length' => 191, 'description' => 'if stored locally, filename is put here'), 'width' => array('type' => 'int', 'description' => 'width of thumbnail'), 'height' => array('type' => 'int', 'description' => 'height of thumbnail'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),