From 1ca01c77d8851b17bf9b309e319f7ab81e85f67e Mon Sep 17 00:00:00 2001
From: webchick <webchick@24967.no-reply.drupal.org>
Date: Thu, 30 Aug 2012 13:27:48 -0700
Subject: [PATCH] Issue #1691438 by Dave Reid, CrashTest_, quicksketch, jbrown:
 Fixed Regression: {file_managed()}.filename should NOT be binary (and
 case-sensitive by default).

---
 core/modules/system/system.install | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index c22f9759f026..aa16d00bdc58 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -872,7 +872,6 @@ function system_schema() {
         'length' => 255,
         'not null' => TRUE,
         'default' => '',
-        'binary' => TRUE,
       ),
       'uri' => array(
         'description' => 'The URI to access the file (either local or remote).',
@@ -2062,6 +2061,19 @@ function system_update_8017() {
   ));
 }
 
+/**
+ * Revert {file_managed}.filename changed to a binary column.
+ */
+function system_update_8018() {
+  db_change_field('file_managed', 'filename', 'filename', array(
+    'description' => 'Name of the file with no path components. This may differ from the basename of the URI if the file is renamed to avoid overwriting an existing file.',
+    'type' => 'varchar',
+    'length' => 255,
+    'not null' => TRUE,
+    'default' => '',
+  ));
+}
+
 /**
  * @} End of "defgroup updates-7.x-to-8.x".
  * The next series of updates should start at 9000.
-- 
GitLab