Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Silvershop 2.x to Silverstripe 4.x db migration.
RENAME TABLE GatewayMessage TO Omnipay_GatewayMessage;
RENAME TABLE GatewayRequestMessage TO Omnipay_GatewayRequestMessage;
RENAME TABLE Payment TO Omnipay_Payment;
RENAME TABLE PaymentMessage TO Omnipay_PaymentMessage;
RENAME TABLE Address TO SilverShop_Address;
RENAME TABLE ProductAttributeType TO SilverShop_AttributeType;
RENAME TABLE ProductAttributeValue TO SilverShop_AttributeValue;
RENAME TABLE CartPage TO SilverShop_CartPage;
RENAME TABLE CartPage_Live TO SilverShop_CartPage_Live;
RENAME TABLE CartPage_versions TO SilverShop_CartPage_Versions;
RENAME TABLE CheckoutPage TO SilverShop_CheckoutPage;
RENAME TABLE CheckoutPage_Live TO SilverShop_CheckoutPage_Live;
RENAME TABLE CheckoutPage_versions TO SilverShop_CheckoutPage_Versions;
RENAME TABLE ColoredProductAttributeValue TO SilverShop_ColoredProductAttributeValue;
RENAME TABLE Discount TO SilverShop_Discount;
RENAME TABLE Discount_Categories TO SilverShop_Discount_Categories;
RENAME TABLE Discount_Members TO SilverShop_Discount_Members;
RENAME TABLE Discount_Products TO SilverShop_Discount_Products;
RENAME TABLE DistanceShippingFare TO SilverShop_DistanceShippingFare;
RENAME TABLE GiftVoucher_OrderItem TO SilverShop_GiftVoucherOrderItem;
RENAME TABLE GiftVoucherProduct TO SilverShop_GiftVoucherProduct;
RENAME TABLE GiftVoucherProduct_Live TO SilverShop_GiftVoucherProduct_Live;
RENAME TABLE GiftVoucherProduct_versions TO SilverShop_GiftVoucherProduct_Versions;
RENAME TABLE GlobalTaxModifier TO SilverShop_GlobalTaxModifier;
RENAME TABLE Order TO SilverShop_Order;
RENAME TABLE OrderAttribute TO SilverShop_OrderAttribute;
RENAME TABLE OrderCoupon TO SilverShop_OrderCoupon;
RENAME TABLE OrderDiscountModifier_Discounts TO SilverShop_OrderDiscountModifier_Discounts;
RENAME TABLE OrderItem TO SilverShop_OrderItem;
RENAME TABLE Product_OrderItem_Discounts TO SilverShop_OrderItem_Discounts;
RENAME TABLE OrderModifier TO SilverShop_OrderModifier;
RENAME TABLE OrderStatusLog TO SilverShop_OrderStatusLog;
RENAME TABLE PartialUseDiscount TO SilverShop_PartialUseDiscount;
RENAME TABLE Product TO SilverShop_Product;
RENAME TABLE Product_Live TO SilverShop_Product_Live;
RENAME TABLE Product_OrderItem TO SilverShop_Product_OrderItem;
RENAME TABLE Product_ProductAddition TO SilverShop_Product_ProductAddition;
RENAME TABLE Product_ProductCategories TO SilverShop_Product_ProductCategories;
RENAME TABLE Product_ProductRelated TO SilverShop_Product_ProductRelated;
RENAME TABLE Product_VariationAttributeTypes TO SilverShop_Product_VariationAttributeTypes;
RENAME TABLE Product_versions TO SilverShop_Product_Versions;
RENAME TABLE ProductCategory TO SilverShop_ProductCategory;
RENAME TABLE ProductCategory_Live TO SilverShop_ProductCategory_Live;
RENAME TABLE ProductCategory_versions TO SilverShop_ProductCategory_Versions;
RENAME TABLE ProductWarehouseStock TO SilverShop_ProductWarehouseStock;
RENAME TABLE RegionRestriction TO SilverShop_RegionRestriction;
RENAME TABLE ShippingMethod TO SilverShop_ShippingMethod;
RENAME TABLE SpecificPrice TO SilverShop_SpecificPrice;
RENAME TABLE TableShippingRate TO SilverShop_TableShippingRate;
RENAME TABLE TaxModifier TO SilverShop_TaxModifier;
RENAME TABLE ProductVariation TO SilverShop_Variation;
RENAME TABLE ProductVariation_AttributeValues TO SilverShop_Variation_AttributeValues;
RENAME TABLE ProductVariation_OrderItem TO SilverShop_Variation_OrderItem;
RENAME TABLE ProductVariation_versions TO SilverShop_Variation_Versions;
RENAME TABLE ProductWarehouse TO SilverShop_Warehouse;
RENAME TABLE Warehouse TO SilverShop_Warehouse;
RENAME TABLE Zone TO SilverShop_Zone;
RENAME TABLE ZonedShippingRate TO SilverShop_ZonedShippingRate;
RENAME TABLE ZoneRegion TO SilverShop_ZoneRegion;
@hpeide

This comment has been minimized.

Copy link
Owner Author

hpeide commented Oct 2, 2018

And if you have many many Files and Images:
RENAME TABLE Product_Files TO SilverShop_Product_Files;
RENAME TABLE Product_Images TO SilverShop_Product_Images;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.