Closed (duplicate)
Project:
Attachment
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 Feb 2007 at 18:16 UTC
Updated:
5 Apr 2007 at 15:32 UTC
Would anyone here be willing to work on creating a PHP script / MySQL query that would allow one to convert and transfer the information contained in the file database table (used by attachment.module) over to the files table (used by Drupal's regular upload.module)?
I don't know about you, but I have a couple of years worth of attachments that will become invisible/unavailable for editing once I move over to Drupal 5.1, since there won't be an attachment.module 5.1. Even if there were one... best to take care of this now than one year from now, when Drupal 6 comes out or something, right?
I know a bit about PHP and MySQL, but this is still beyond me. I would appreciate any help.
Comments
Comment #1
drewish commentedThat'd be a very good feature. I had to do the same thing with a version of the audio module i wrote that depended on filemanager. As a reference, the code I used can be found at: http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/drewish/audio...
Comment #2
ricmadeira commentedWow, thanks! That function audio_update_7() looks like it could be a nice starting place. It looks up the entries in the old table, places them in the new one and even moves the files over to a new directory (not sure if that will be necessary or not at this point); it's as simple as that, I think.
This is just what a new guy like me needs to get to work. Thanks again! I'll try to make something out of this... if someone gets there first, please post your work here!
Comment #3
andykemp commentedHas any progress been made on this? I would really appreciate this script as I want to move over to Drupal 5, but don't want to have to reupload 400 odd files...
Happy to help out if needed but not sure where to start with something like this!
Comment #4
ricmadeira commentedI haven't started working on this yet, sorry. Got a couples other more pressing problems with my migration to 5.1 to solve first.
Comment #5
sunI'll also need that migration soon.
Some facts that need to be adressed properly:
Comment #6
drewish commentedtexasnomad, put a patch up over at: http://drupal.org/node/133956 even though this is older, i'm going to mark this as a duplicate since that has a patch. i'd really appreciate some testing of his patch.