summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGábor Hojtsy2008-02-08 18:01:14 (GMT)
committerGábor Hojtsy2008-02-08 18:01:14 (GMT)
commitc7f6540adcf68b683b7245babdbc937e75add681 (patch)
tree90f75090548ba703c103c05d50f90db11eb41d56
parente7645119adffce349e8bedc1440adf1885e21ba8 (diff)
#219334 report by catch, patch by myself: upload table created in upgrade and upload table created by upload module enabled later collides
-rw-r--r--modules/upload/upload.install8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/upload/upload.install b/modules/upload/upload.install
index 2a5fa21..e440771 100644
--- a/modules/upload/upload.install
+++ b/modules/upload/upload.install
@@ -5,8 +5,12 @@
* Implementation of hook_install().
*/
function upload_install() {
- // Create tables.
- drupal_install_schema('upload');
+ // Create table. The upload table might have been created in the Drupal 5
+ // to Drupal 6 upgrade, and was migrated from the file_revisions table. So
+ // in this case, there is no need to create the table, it is already there.
+ if (!db_table_exists('upload')) {
+ drupal_install_schema('upload');
+ }
}
/**