View Full Version : adding a prefix to the mysql tables
October 10th, 2004, 12:49 PM
I currently have PP and IPB integrated but using different databases. I’d lke to merge them into a single database to reduce the peak time load created from switching back and forth between databases to grab info from here or there.
I’d like to add a prefix PP_ to all photopost tables, then import then into my forum DB.
I guess my first question would be what SQL command can I run via phpmyadmin to add the prefix to the tables
Next questions is what would I need to change in the PP config to make sure everything works after the table name change?
October 10th, 2004, 02:01 PM
There is no mass sql you could do to alter every table at one time. You need to modify each one after you take the dump before you upload it to IBp database. Anotherwards every instance of CREATE TABLE blahblah make it CREATE TABLE pp_blahblah Then import the tables and data into your ibp database.
You then only need to change the database access info in the photopost config for the photopost part to point to the ibp database and add the prefix in the config file as well.
If everything is working right then you can safely delete the photopost database and your left with one database with both products working in there
October 10th, 2004, 02:13 PM
great, thanks chuck!
October 10th, 2004, 02:15 PM
Placing the tables in another database is easy. I have done it several times. I started out with all the products in separate databases and then combined them all.
October 10th, 2004, 05:34 PM
Yep, that was pretty easy, took about 30 minutes to complete the move and update my code. Thanks for the tip.
Now the question is...How much overhead does it really save?
October 10th, 2004, 05:36 PM
exactly how much I can not say for sure. depends on the database sizes number of tables mysql config etc etc
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.