Closed (fixed)
Project:
Web File Manager
Version:
4.7.x-1.3
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
26 Jan 2007 at 16:57 UTC
Updated:
6 Apr 2007 at 04:17 UTC
Jump to comment: Most recent file
Comments
Comment #1
robmilne commentedA very good idea however I am in the process to porting this module to 5.0. If you go ahead and make the required changes to webfm.install I will gladly review/integrate a patch.
Comment #2
mailleux commentedDo you believe it's just a question of creating the proper creation script. I can do that and do some testing. Is there any mysql specifics in the module itself?
Comment #3
robmilne commentedI believe that the install script is the only change required. All db ops should be using drupal's database layer so I don't see why postgre shouldn't work. Please keep me posted wrt your success. I will definitely commit any additions/patches that further the module.
Comment #4
mailleux commentedRob,
I patched the Module and did some testing, everything looks ok. I do have some "db style" questions, but I ported to Postgres keeping everything the same.
On the "style" I wondered:
Also while testing an idea came to mind, I you ever loose the tables, you have to recreate the entire database by hand. I wonder if a Import/Export metadata would help. This could be done outside PHP...
Outside that as far as I tested, works fine.
Comment #5
robmilne commentedThanks Thomas for the patch. I'll integrate it into the next release.
* Why there aren't foreign keys, and references between the tables?
My db experience is not extensive so I don't understand the question. If the design of the tables can be improved please elucidate.
* Why have NOT NULL with default to ''? I tried NULL on the fdesc (that had no default) and the module stopped working.
Again, my inexperience wrt databases is showing. How should this field be properly defined?
The import/export suggestion sounds good though I won't be able to consider developing it for some time due to my busy schedule.
Comment #6
mailleux commentedForeign keys are use to link data in two tables. In WebFM case, webfm_file and webfm_attach could be linked so that you can only add an entry on the webfm_attach if both the node and the file exit. This avoids leaving data behind. This protects data integrity. However it means that programming must be consider that (for example you can't delete an entry from webfm_file if there is a reference to it in webfm_attach).
The issue with the NOT NULL in the webfm_table is that if the data can be omitted it should be NULLable. But the problem is that for some reason the JS is sensitive to this.
Anyway these are just ideas to improve the DB design, if time permits I'll look into this and open a new issue.
Comment #7
robmilne commentedPostgres support added to 5.x-1.5. 4.7 to upgrade to come soon.