I have a client with a big database. I took their existing site and created a development site. I took a copy of their existing database and made multiple name changes. By name changes, I mean changing the column names, not the the field type, no adding primary/foreign keys etc. With the new changes, is it possible to import and update the column names? I'm using PHPmyAdmin.
Example structure for one of my tables.
old:
Column Type Null Default
form varchar(5000) No
date datetime No
New one to update:
Column Type Null Default
ind_Form varchar(5000) No
ind_Date datetime No
bus_ID int(11) No
Is this something I can do easily with phpmyadmins import functionality? Or is this something that where I have to change the column names manually? Any help would be greatly appreciated
The easiest and most consistent way I think would be creating a script to do it.
I would create another copy of the live database and start writing a script using ALTER TABLE
statements to make the necessary changes to the database so that it matches the new schema you are trying to emulate.
Get it perfect using copies of the live database so you can be sure it will work correctly, and then run it on the live database.