Changing field types - do you lose existing info?
Posted: 17 August 2009 08:58 AM   [ Ignore ]  
Grad Student
Avatar
Rank
Total Posts:  57
Joined  12-05-2008

I’m wondering what happens if I’ve been using a plugin for a field type, like an image uploader, for several months and the client has uploaded lots of files, then we find it necessary to change the plugin. 

Does all the uploaded info in the DB get lost?  As in, if one plugin had fields saving the url to an uploaded picture and I change the field type to a text field, will it print that url string, or will all the info be borked in the DB? And then if I realize the field type change (or plugin change) don’t work as needed or expected, would switching back to the original restore the original functionality.

In my example, I’ve got a hodge-podge of plugins going on that may not be compatible with 1.6.8, or could be handled better with the FieldFrame.  If I find out that the existing plugins don’t work under 1.6.8 and have to change what I’m using, I want to know if I’ll be looking at re-uploading all the files used with the old plugin.

Moved to the Extensions forum by Moderator

Profile
 
 
Posted: 17 August 2009 10:42 AM   [ Ignore ]   [ # 1 ]  
Chancellor's Fellow
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  30387
Joined  04-29-2002

It depends.

For instance:

a:1:{s:9:"file_name";s:14:"chalkboard.jpg";

One of my image file fields stores this info in it. If I convert it to a textarea or text field, that content won’t be automagically changed to have a link with chalkboard.jpg in it.

In my example, I’ve got a hodge-podge of plugins going on that may not be compatible with 1.6.8, or could be handled better with the FieldFrame.  If I find out that the existing plugins don’t work under 1.6.8 and have to change what I’m using, I want to know if I’ll be looking at re-uploading all the files used with the old plugin.

Plugins are strictly front end items. I think you’re comparing apples and oranges.

Could you be more specific?

Profile
MSG
 
 
Posted: 17 August 2009 12:15 PM   [ Ignore ]   [ # 2 ]  
Grad Student
Avatar
Rank
Total Posts:  57
Joined  12-05-2008

Sorry for the sloppy post.  I did mean extensions, not plugins.  For example, I’m using the Mark Huot File ext for a custom field that the client uses to upload pdf’s and images.  However, it doesn’t do exactly what I need for some new functionality (client needs to be able to be able to indefinitely add new upload fields).

When I add a new extension to cover this functionality and switch the custom entry field to use the new extension, will that potentially screw up the months of uploads my client has already made, or is it safe to swap between extensions/custom entry fields?

I realize I’m not explaining this very well, and apologize ahead of time.

Profile
 
 
Posted: 17 August 2009 12:28 PM   [ Ignore ]   [ # 3 ]  
Grad Student
Avatar
Rank
Total Posts:  57
Joined  12-05-2008

My question is 2 fold:

1. Philosophically, so I can grasp what is possible/suggested with regard to this in future development (ie understanding best practice).

2. Practical: I (may) need to transition my File (Mark Huot) extension custom field to being a FieldFrame + nGen File Field custom field.

Profile
 
 
Posted: 17 August 2009 12:58 PM   [ Ignore ]   [ # 4 ]  
Chancellor's Fellow
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  30387
Joined  04-29-2002

Practical solution - ask nGen author. smile This is a third party conversation, moving there so the authors can chime in.

Profile
MSG
 
 
Posted: 17 August 2009 01:32 PM   [ Ignore ]   [ # 5 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  180
Joined  06-27-2007

@inlikealion - I had no trouble converting 1000+ entries in the MH File format to nGen’s field. They made this compatibility in a recent point update.

 Signature 

twitter

Profile
 
 
Posted: 17 August 2009 01:34 PM   [ Ignore ]   [ # 6 ]  
Chancellor's Fellow
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  30387
Joined  04-29-2002

Thanks for posting that update, eyevariety. Good to know!

Profile
MSG
 
 
Posted: 17 August 2009 02:24 PM   [ Ignore ]   [ # 7 ]  
Grad Student
Avatar
Rank
Total Posts:  57
Joined  12-05-2008

Thanks, eyevariety for that info.  Sue, thanks again for the help and moderation.

So, I still don’t have an answer for the #1. Philosophical question.  Should you on principal never change extension types for custom fields with existing entries for fear of losing the data and not being able to switch back to the original extension if the new one doesn’t work out?

Profile
 
 
Posted: 17 August 2009 02:28 PM   [ Ignore ]   [ # 8 ]  
Chancellor's Fellow
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  33338
Joined  05-15-2004

Speaking philosophically as we do, I place a lot of trust in working backups… That said, if you switch the field type to an extension that does not support some features, yes, you’ll probably lose some data.

Profile
MSG