Mantis Bugtracker 

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001137TestLinkNew Featurepublic2007-10-23 12:422010-05-01 20:35
Assigned Tofman 
PrioritylowSeverityfeature requestReproducibilityN/A
PlatformOSOS Version
Product Version1.7.0 final 
Fixed in Version1.9 Beta 2 
Summary0001137: Instaler: Add automatically database table name prefix
DescriptionCan the TestLink add a prefix to a database table name?
When I installed TestLink in a rental server,only one database is

cf [^]
TagsNo tags attached.
Database (MySQL,Postgres,etc)
PHP Version
QA Team - Task Workflow Status
Attached Files

- Relationships

-  Notes
mhavlat (reporter)
2007-10-23 19:02

Good idea, however it means care amount of dependencies.
Initial installation could support it via alter but upgrade of DB schema will be problem in this case.
fman (administrator)
2007-10-25 21:22

We can add additional parameter in installer page (table_prefix).
hantani (reporter)
2007-10-26 08:06

Thank you.
I am glad to read comment.
fman (administrator)
2007-10-26 14:53

I've start thinking about these (using as model Mantis as usual), as is not easy at seems.
We will need to change EVERY SQL statement to add the prefix to table name.

IMHO this is not high priority, but must be fixed.

Please be patiente
mhavlat (reporter)
2007-11-05 19:42

Agreed. Low priority.
JSThePatriot (reporter)
2009-06-02 23:55

I would like to bring this issue back up. It's coming up on 2 years that this has been a low priority. My company cannot and will not use a system that doesn't allow the prefixing of tables since we're only allowed one database on our public web server. We could host it internally, but we don't have an up to date server to do that with. I know this would require putting a variable in front of all sql queries, but I find that this would be quite essential. It could ask in the installer, set the property in the config file like other PHP projects that do this. If someone knows where all the SQL statements are, I wouldn't mind trying to do this myself, and submitting a patch. I would like to see this added into the next release, or bug fix release if possible. I may not have an option of looking to another piece of software if this isn't something that can be moved up.
mhavlat (reporter)
2009-06-03 20:01

Do anybody know if ADODB PHP component have support for it?
I have added new parameter
   $tlCfg->db_table_prefix = '';
for the purpose. So you can modify and attach testlink classes to use it.
fman (administrator)
2009-06-03 20:04

you can see that in several classes we have created (a copy from mantis)
variables with table names.
If we want to use $tlCfg->db_table_prefix, we need to inform users he has to configure it before install and change installer.
If we want to use a DEFINE created during install we need to work in other way.

what we want to use ?
mhavlat (reporter)
2009-06-03 21:05

I expected that installer should allow to define this value and save into config. This should be the second phase of this request.

I defined $tlCfg->db_table_prefix to allow modify the current SQL requests to use it without harm. This is the first phase.

I(You) can remove the variable if you think that constant is better way. I have no special reason.
fman (administrator)
2009-06-03 21:45

is not matter of remove $tlCfg->db_table_prefix, the question is how we will manage both alternatives.
anyway this will be not my development, then I do not care
mhavlat (reporter)
2009-06-03 22:04

@Francisco, what is second alternative?
fman (administrator)
2009-06-04 05:08

work started on HEAD
jyst for the record installer has part of code to mamage thsi form 2005
fman (administrator)
2009-06-04 17:02

>> I would like to see public announcement
for me public announcement is this issue

>> 1. You decide to use constant DB_TABLE_PREFIX
see no other option, this way we continue to write on just one file

>> 2. Guide how to define/use table names in class
till now nobody has cared about what has been done.
nodobody has asked.
nodoby has followed same line of approach for this.
sometime neither me. ;)

>> BTW should not we directly define array?
this is good idea, and i have done this on last work done yesterday night
After all work ok I will plan to refactor.
First milestone all code UP and running with first not optimal version.
mhavlat (reporter)
2009-06-04 17:30

Please, let me know a class where the work is done the best way. I will announce it for dev who do not monitor this issue.

- Issue History
Date Modified Username Field Change
2007-10-23 12:42 hantani New Issue
2007-10-23 19:02 mhavlat Note Added: 0002432
2007-10-23 19:02 mhavlat Priority normal => low
2007-10-23 19:02 mhavlat Category Installer => New Feature
2007-10-23 19:02 mhavlat Summary Database table name prefix => Instaler: Add automatically database table name prefix
2007-10-25 21:22 fman Note Added: 0002453
2007-10-26 08:06 hantani Note Added: 0002457
2007-10-26 14:53 fman Note Added: 0002459
2007-11-05 19:42 mhavlat Note Added: 0002531
2007-11-05 19:42 mhavlat Status new => acknowledged
2009-06-02 23:55 JSThePatriot Note Added: 0007122
2009-06-03 20:01 mhavlat Note Added: 0007128
2009-06-03 20:04 fman Note Added: 0007129
2009-06-03 21:05 mhavlat Note Added: 0007130
2009-06-03 21:45 fman Note Added: 0007131
2009-06-03 22:04 mhavlat Note Added: 0007137
2009-06-04 05:08 fman Note Added: 0007143
2009-06-04 17:02 fman Note Added: 0007148
2009-06-04 17:30 mhavlat Note Added: 0007151
2009-09-07 17:05 fman Status acknowledged => resolved
2009-09-07 17:05 fman Fixed in Version => 1.9 (DEV)
2009-09-07 17:05 fman Resolution open => fixed
2009-09-07 17:05 fman Assigned To => fman
2010-05-01 20:35 fman Status resolved => closed

Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker