Moving uploads table to new database
2 posts by 2 authors in: Forums > CMS Builder
Last Post: April 11, 2012 (RSS)
By concrete - April 11, 2012
I streamlining the code to my application largely in part due to the release of the upgraded dependent fields add on http://www.interactivetools.com/add-ons/detail.php?Show-Hide-Dependent-Fields-Plus-1060.
My issue is that if i combine two of my tables into one table they will lose their association with the cms_uploads table.
I'm sure this has come up before. Is there a process in place to accomplish this move.
Also it might be an idea to add a GUID to make this easier.
My issue is that if i combine two of my tables into one table they will lose their association with the cms_uploads table.
I'm sure this has come up before. Is there a process in place to accomplish this move.
Also it might be an idea to add a GUID to make this easier.
Re: [concrete] Moving uploads table to new database
By Jason - April 11, 2012
Hi,
I have heard of this coming up before. It's actually pretty tricky, since the uploads table needs to track the tableName of the record's section, but also it's record number. If you are combining two tables, both of these fields will change, breaking the associations.
The best approach here, I think, would be to write a custom script that would take care of the move. It would be able to move the target record from one section to another, and then update the uploads table with the new tableName, and record number. The script itself would be pretty simple and would help eliminate errors and record num collisions.
If you are interesting in this, please send an email to consulting@interactivetools.com and we can go over some options.
Hope this helps
I have heard of this coming up before. It's actually pretty tricky, since the uploads table needs to track the tableName of the record's section, but also it's record number. If you are combining two tables, both of these fields will change, breaking the associations.
The best approach here, I think, would be to write a custom script that would take care of the move. It would be able to move the target record from one section to another, and then update the uploads table with the new tableName, and record number. The script itself would be pretty simple and would help eliminate errors and record num collisions.
If you are interesting in this, please send an email to consulting@interactivetools.com and we can go over some options.
Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/