SilverShop\Tasks\ShopMigrationTask
TODO: Implement for 2.x to 3.x Updates database to work with latest version of the code.
Synopsis
class ShopMigrationTask
extends MigrationTask
{
- // members
- public static integer $batch_size = 250;
- protected string $title = 'Migrate Shop';
- protected string $description = 'Where dev/build is not enough, this task updates database to work with latest version of shop module. You may want to run the CartCleanupTask before migrating if you want to discard past carts.';
- // methods
- public void up()
- public void migrateOrders()
- public void migrate()
- public void migrateProductPrice()
- public void migrateProductImages()
- public void migrateMemberFields()
- public void migrateStatuses()
- public void migrateShippingValues()
- public void migrateOrderCalculation()
- public void migrateProductVariationsAttribues()
- public void migrateShippingTaxValues()
Hierarchy
Extends
- SilverStripe\Dev\MigrationTask
Tasks
Line | Task |
---|---|
36 | migrate CheckoutPage->TermsPageID to ShopConfig |
63 | set a from / to version to preform a migration with |
144 | see if this actually works..it probably needs to be writeen to a SQL query |
181 | delete Product_VariationAttribute, if it's empty |
Members
protected
- $description
- $title
public
-
$batch_size
Choose how many orders get processed at a time.
Methods
public
- migrate() — Perform migration scripts on a single order.
- migrateMemberFields() — Customer and shipping details have been added to Order, so that memberless (guest) orders can be placed.
- migrateOrderCalculation() — Performs calculation function on un-calculated orders.
- migrateOrders() — batch process orders
- migrateProductImages() — Rename all Product_Image ClassNames to Image Added in v1.0
- migrateProductPrice()
- migrateProductVariationsAttribues()
- migrateShippingTaxValues()
- migrateShippingValues() — Convert shipping and tax columns into modifiers
- migrateStatuses() — Migrate old statuses
- up() — Migrate upwards