summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2013-12-25 13:36:03 -0500
committerDavid Rothstein <drothstein@gmail.com>2013-12-25 13:36:03 -0500
commit6c89f3924e7e375e634b52f539520b9125789431 (patch)
tree37ba751ccbbdd650e26eb36e4b8dce809280bec8
parentfe2e82070ad7fe9e4ed4540bc9493765c762e2e9 (diff)
downloadbrdo-6c89f3924e7e375e634b52f539520b9125789431.tar.gz
brdo-6c89f3924e7e375e634b52f539520b9125789431.tar.bz2
Issue #1815886 by bojanz, slashrsm | torgosPizza: Change the database schema to allow Drupal core to manage files larger than 4 GB.
-rw-r--r--CHANGELOG.txt2
-rw-r--r--modules/system/system.install16
2 files changed, 18 insertions, 0 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 028760a99..e7817422b 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,6 +1,8 @@
Drupal 7.25, xxxx-xx-xx (development version)
-----------------------
+- Changed the database schema of the {file_managed} table to allow Drupal to
+ manage files larger than 4 GB.
- Changed the File module's hook_field_load() implementation to prevent file
entity properties which have the same name as file or image field properties
from overwriting the field properties (minor API change).
diff --git a/modules/system/system.install b/modules/system/system.install
index 7d3c95916..3c83c37e9 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -858,6 +858,7 @@ function system_schema() {
'filesize' => array(
'description' => 'The size of the file in bytes.',
'type' => 'int',
+ 'size' => 'big',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
@@ -3134,6 +3135,21 @@ function system_update_7078() {
), array('unique keys' => array('formats' => array('format', 'type'))));
}
+/*
+ * Convert the 'filesize' column in {file_managed} to a bigint.
+ */
+function system_update_7079() {
+ $spec = array(
+ 'description' => 'The size of the file in bytes.',
+ 'type' => 'int',
+ 'size' => 'big',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ );
+ db_change_field('file_managed', 'filesize', 'filesize', $spec);
+}
+
/**
* @} End of "defgroup updates-7.x-extra".
* The next series of updates should start at 8000.