postgreSQL support
JamieR - January 26, 2007 - 16:57
| Project: | Web File Manager |
| Version: | 4.7.x-1.3 |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
I would like to test the module and am required to use postgres...
Thank you!

#1
A 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.
#2
Do 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?
#3
I 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.
#4
Rob,
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.
#5
Thanks 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.
#6
Foreign 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.
#7
Postgres support added to 5.x-1.5. 4.7 to upgrade to come soon.