VbzCart/tables/orders/migration

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< VbzCart‎ | tables‎ | orders
Revision as of 16:18, 3 June 2017 by Woozle (talk | contribs) (extracted from main page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Migration

This was used to migrate the data on 2016-03-06: <mysql>INSERT INTO orders_new(

 `ID`,
 `Number`,
 `SortPfx`,
 `ID_Cart`,
 `ID_Pull`,
 `ID_Buyer`,
 `ID_Recip`,
 `BuyerName`,
 `RecipName`,
 `RecipAddr`,
 `PayType`,
 `ID_BuyerCard`,
 `ID_RecipAddr`,
 `WebTotal_Merch`,
 `WebTotal_Ship`,
 `WebTotal_Final`,
 `WhenStarted`,
 `WhenPlaced`,
 `WhenRevised`,
 `WhenNeeded`,
 `WhenClosed`

) SELECT

 `ID`,
 `Number`,
 `SortPfx`,
 `ID_Cart`,
 `ID_Pull`,
 `ID_Buyer`,
 `ID_Recip`,
 `BuyerName`,
 `RecipName`,
 `RecipAddr`,
 `PayType`,
 `ID_BuyerCard`,
 `ID_RecipAddr`,
 `WebTotal_Merch`,
 `WebTotal_Ship`,
 `WebTotal_Final`,
 `WhenStarted`,
 `WhenPlaced`,
 `WhenEdited`,
 `WhenNeeded`,
 `WhenClosed`

FROM orders</mysql>Note that "WhenEdited" was copied to "WhenRevised" in the new table, not to "WhenEdited". (2016-03-07 Update: it turns out that this can be done with a single SQL command, which MySQL Workbench can facilitate via some controls that are normally hidden in a drop-down area. Now I know...)