We maintain 1 databases (mysql) that will often have columns added to a particular table.
Table1 is a master table with virtually no data in it. Its sole purpose is to accept new unaudited information from our partners. Once the info is accepted, the data will dump into table2.
Table2 is the working database.
Both databases should be the same structure.
We will often get information from our partners which make us have a need to add a column. Because table1 is a direct import, the columns are created automatically. But we have to manually change the columns in table1 for all of our queries to work.
I want to use php in our application to look at the structure of table1, detect the columns which are missing in table2, and automatically make the structure of table2 the same as table1.
Any help?
Table1 is a master table with virtually no data in it. Its sole purpose is to accept new unaudited information from our partners. Once the info is accepted, the data will dump into table2.
Table2 is the working database.
Both databases should be the same structure.
We will often get information from our partners which make us have a need to add a column. Because table1 is a direct import, the columns are created automatically. But we have to manually change the columns in table1 for all of our queries to work.
I want to use php in our application to look at the structure of table1, detect the columns which are missing in table2, and automatically make the structure of table2 the same as table1.
Any help?