Sutput the table definitions and cut and paste the new columns into a ALTER TABLE table_name ADD column_name column-definition statement.
--- On Wed, 6/8/08, Jerry Schwartz <[EMAIL PROTECTED]> wrote: > From: Jerry Schwartz <[EMAIL PROTECTED]> > Subject: Transplanting table structure changes > To: mysql@lists.mysql.com > Date: Wednesday, 6 August, 2008, 4:46 PM > I've added about a dozen new columns to two tables in my > development > environment, and now I need to roll it out to our > production environment. > Can anyone suggest an easy way to do this? I want to avoid > typos, as much as > I can. > > > > I made the original changes with PHPMyAdmin, so I don't > have any original > script to re-use. The best idea I've come up with is to > capture the output > of SHOW CREATE TABLE and massage that, but I wonder if > I'm missing > something. > > > > The production environment has data in the "old" > columns, and all of the new > columns allow NULL, so all I really need to do is preserve > the existing data > and add the new columns. > > > > Although we've discussed this before, and I admit it > makes no sense from the > machine's point of view, I want to insert the new > fields in a particular > place for the benefit of the humans who will be using MS > Access to view and > filter these tables. > > > > Regards, > > > > Jerry Schwartz > > The Infoshop by Global Information Incorporated > > 195 Farmington Ave. > > Farmington, CT 06032 > > > > 860.674.8796 / FAX: 860.674.8341 > > > > <http://www.the-infoshop.com> www.the-infoshop.com > > <http://www.giiexpress.com> www.giiexpress.com > > www.etudes-marche.com __________________________________________________________ Not happy with your email address?. Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]