From caa0dd549e6dba1e5af83b91ae7b6d169840091f Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sat, 28 Feb 2015 12:56:42 +0100 Subject: [PATCH] Avatar table url field now 'text', maybe use filename as unique key? --- classes/Avatar.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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')), -- 2.39.5