I have been working on upgrading my flashnode module for Drupal 6 and I see that the {files} table is changing and nid is being dropped.
Flashnode (for D-5) currently uses nid to link entries in the {flashnode} table to entries in the {files} table. Earlier versions of flashnode used to store both nid and fid, but because the {files} table had both of these I stopped storing fid as this could be derived from the nid alone. Maybe that was wrong at the time, but anyhow, that's how it works.
The problem is that with D-6 the nid gets dropped and replaced by uid, so existing content will have no way of establishing the connection between flashnodes and files, post upgrade.
One option is to write a pre-upgrade routine for flashnode, to be run on existing D-5 sites, that will amend the {flashnode} table to add in the new data. However, I am fairly sure some people might dive in, upgrade, and then realise their content is broken.
Just a thought, and it may be late in the day, but would it be possible to make a table available that holds old fid/nid pairs that modules could refer to after an upgrade? That way a user can follow a simple upgrade path?
Any help on the right way forward would be appreciated. I think flashnode is being used on quite a few sites (it is possible to tell by searching for the substitution text on a search engine!) and while the "pre upgrade" route would work it might result in some unhappy Drupal users?
I think this change to {files} could also upset some other modules, for example, image also reads data from {files} using $result = db_query("SELECT filename, filepath FROM {files} WHERE nid=%d", $node->nid);, so it also uses nid since it has no table of its own. Again, successful migration of this module would need a pre-upgrade script?
Here again a simple fid/nid table would help provide an "invisible" migration path to users, while allowing modules to be re-written to use the new D-6 structure by accessing earlier data during installation in order to configure themselves appropriately?
Comments
tracking...
tracking...
I know this isn't really
I know this isn't really helpful, but I notice that Image has a requirement to upgrade to the 5.x-2.x version before upgrading to 6.x-2.x. Perhaps they are using that path to address the issue you raised.
---
"Nice to meet you Rose...run for your life." - The Doctor
My first public Drupal site - EyeOnThe503
the relation between nid and fid is stored in upload table
Hello,
Maybe this is an old post and it is not worthy answering it, but I have realized that the relation you are looking for is stored in the upload table.
Hope this helps.