View Issue Details

IDProjectCategoryView StatusLast Update
0004527mantisbtcustomizationpublic2005-05-31 11:34
Reporterryandesign Assigned Tothraxisp  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.19.0 
Fixed in Version1.0.0a1 
Summary0004527: Want to customize just $g_db_table_prefix, not $gmantis*_table
Description

By default the Mantis database tables all begin with "mantis_". I would like to follow phpMyAdmin's recommendations, which state that a project's tables should begin with the project name and then two underscores, so "mantis__". To accomplish this I want to be able to just change a single config variable, $g_db_table_prefix, but this is not possible -- I must also copy the 24 $gmantis*_table variables verbatim to my config file, otherwise they get defined with the old default $g_db_table_prefix before my config file is even loaded.

Additional Information

It might be better if the 24 $gmantis*_table variables could be redefined to use perhaps sprintf notation, for example $g_mantis_bug_file_table = '%s_bug_file_table'; Then after loading the user's config file, the sprintf substitution can be done with for example $g_mantis_bug_file_table = sprintf($g_mantis_bug_file_table, $g_db_table_prefix);

Using something like this sprintf notation here has the advantage that it preserves backward compatibility. Setups where the $g_db_table_prefix had been changed and the 24 $gmantis*_table variables had been copied to the config file will continue to work.

The other way would be to define the 24 $gmantis*_table variables to be just the suffixes, and later tack the $g_db_table_prefix on to the front with a concatenation. This would, however, not be backwards-compatible, and would break all existing config files that customize these variables, which is probably a bad idea, especially when backwards compatibility is possible with the sprintf method above.

TagsNo tags attached.

Activities

thraxisp

thraxisp

2005-04-26 18:52

reporter   ~0009931

This was fixed as a side effect of the config in database feature.