Gossamer Forum
Home : Products : Gossamer Links : Discussions :

[BUG] Repairing tables function should check missing fields

Quote Reply
[BUG] Repairing tables function should check missing fields
[BUG]
There is a missing feature from "Repairing tables" function.
I call it bug, since the function doesn't do everything what the name suggests: especially doesn't check if the database, the tables, or the table fields are existing, nor is it recreating them if missing.
Of course, this should be an optional feature, as there may be users, who deletes some fields, because they don't use it, or maybe rename a table.

[Suggested FIX]
The "Repairing tables" function should check if all required fields exists (optionally, similarly as the undocumented 'force' option).
So if a field is missing, it should recreate the field.
The suggested URL parameter key would be: 'check'
The suggested URL parameter values would be: 'database', 'tables', 'fields'
Logically 'database' value will create database if missing, 'tables' value will create missing tables, 'fields' value will create the missing original fields.

The URL of "Repairing tables" function would look like this:
http://site/cgi-bin/lsql/admin/nph-build.cgi?do=repair&check=fields


Note however, that "Repairing tables" function should never fix missing tables or fields, without a user request. User should type an URL like above (or click a link & confirm a form).

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] [BUG] Repairing tables function should check missing fields In reply to
I'd like this as well. Just a few days ago I found a missing column in my users table when trying to add a user while testing a plug-in I'm writing. I had created the field in an old installation, somehow it didn't make it to my current installation, but yet it was in my .def file.

Philip
------------------
Limecat is not pleased.