From c31d6608a8d66ec5bf0ad27ef59730209ad40166 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Wed, 27 May 2015 21:54:51 +0200 Subject: [PATCH] remove _all_ file URLs not just the duplicates --- classes/File.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/classes/File.php b/classes/File.php index 0018a03e32..9a8f9eaf53 100644 --- a/classes/File.php +++ b/classes/File.php @@ -639,6 +639,8 @@ class File extends Managed_DataObject print "\nWarning! URL suddenly disappeared from database: {$file->url}\n"; } } + echo "...and now all the non-duplicates which are longer than 191 characters...\n"; + $file->query('UPDATE file SET url=LEFT(url, 191) WHERE LENGTH(url)>191'); echo "\n...now running hacky pre-schemaupdate change for $table:"; // We have to create a urlhash that is _not_ the primary key,