[psa-devel] Re: [psa-devel]Database Table Names
Brought to you by:
koivi
From: Justin K. <ju...@ko...> - 2003-08-04 13:03:37
|
Alex Ezell wrote: > I have modified the code to allow the user to supply a prefix for the > database tables. This change is only in the application code. I did > not make the change in the code that creates the tables to begin with. > So, the user would have to rename the tables manually within the DB, > and then use the config.php to give the application the prefix they > used. Obviously, there is more work to do to make it seamless to the > users, but I thought this might be a nice feature. In order to have this included in the next release of PSA, the database structure needs to be adjusted to handle it as well. If it doesn't, there will be way too many "why doesn't this work" messages coming to the lists. One way of going about this is to have the install script check the config file for an appropriate setting. If the setting is not 'psa', then it would read the file in, and use a regex to replace '<table>psa' with '<table>'.$table_prefix_var, then write the file back out. > I needed it because I am using PSA in a larger app that I am building, > and I want to have all the db tables of my app, including those used > by PSA, to have the same prefix so that installation is easier. > > I don't have a connection to CVS setup and as the implementation is > incomplete it wouldn't suit to check it in anyway. However, I could > provide the code I do have to anyone who wants it. Overall, it would be a handy option. All the queries in the class would need to be modified to support this and a vriable in the config file would need to be created, but other than that, only the install script would need any real work done to it. Sorry it took so long to get back to this, I just returned from a couple weeks vacation time I had coming. ;) Justin |