Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently our Drupal 5 to Drupal 6 upgrade path does not work for FileField. It does not enable any of the previously used FileFields and their "status" is left at 0 in the database, effectively making all FileFields disappear.
Generally speaking this is usually fixed with a call like this:
content_associate_fields('filefield');
We also need to use the "safe" version of content_fields() during the upgrade, since content_fields() won't list any fields that are disabled. Instead we should use content_types_install(). This patch corrects these problems and restores the upgrade path from Drupal 5 as far as I've tested.
Comment | File | Size | Author |
---|---|---|---|
#2 | filefield_upgrade_columns.patch | 1.22 KB | quicksketch |
filefield_upgrade_fix.patch | 3.83 KB | quicksketch |
Comments
Comment #1
quicksketchCommitted.
Comment #2
quicksketchLooks like we've got a new problem with the upgrade now. Using content_install_types() gets us the current definition as defined by modules, and doesn't actually check the current database. So rather than starting with the current schema and specifying the new one, we start with the new one and we need to specify the old one.
This patch specifies both the new and the old schema to fix this problem.