From: Mikael Nordfeldth Date: Sat, 28 Feb 2015 11:56:42 +0000 (+0100) Subject: Avatar table url field now 'text', maybe use filename as unique key? X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=caa0dd549e6dba1e5af83b91ae7b6d169840091f;p=quix0rs-gnu-social.git Avatar table url field now 'text', maybe use filename as unique key? --- diff --git a/classes/Avatar.php b/classes/Avatar.php index 3b3317b3ef..420f384e13 100644 --- a/classes/Avatar.php +++ b/classes/Avatar.php @@ -33,13 +33,13 @@ class Avatar extends Managed_DataObject 'height' => array('type' => 'int', 'not null' => true, 'description' => 'image height'), 'mediatype' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'file type'), 'filename' => array('type' => 'varchar', 'length' => 191, 'description' => 'local filename, if local'), - 'url' => array('type' => 'varchar', 'length' => 191, 'description' => 'avatar location'), + 'url' => array('type' => 'text', 'description' => 'avatar location, not indexed - do not use in WHERE statement'), 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'), ), 'primary key' => array('profile_id', 'width', 'height'), 'unique keys' => array( - 'avatar_url_key' => array('url'), +// 'avatar_filename_key' => array('filename'), ), 'foreign keys' => array( 'avatar_profile_id_fkey' => array('profile', array('profile_id' => 'id')),