diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e92d3e71..0ee778c2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ +2.1.8 +============= +* Added support for versions: + + * Magento CE: 1.9.3.4, 2.1.8 + * Magento EE: 1.14.3.4, 2.1.8 + +* Fixed bugs: + + * Volume checks were missing when migrating data to EE + * Delta did not work on archived sales order grid + * Urlrewrites added unwanted extra dot to url suffix + * [Issue #306](https://github.com/magento/data-migration-tool/issues/306): Tables prefix was not added to the table `customer_entity` which triggered error + * [Issue #279](https://github.com/magento/data-migration-tool/issues/279): No warnings appeared when delta tables could not be created + 2.1.7 ============= * Added support for versions: diff --git a/composer.json b/composer.json index 8a9f6cc9d..447d3b0a8 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "magento/data-migration-tool", "description": "Migration Tool", - "version": "2.1.7", + "version": "2.1.8", "require": { "symfony/console": "~2.3", "magento/framework": "~100.1", diff --git a/etc/ce-to-ce/1.9.3.4/config.xml.dist b/etc/ce-to-ce/1.9.3.4/config.xml.dist new file mode 100644 index 000000000..dc6f1cca1 --- /dev/null +++ b/etc/ce-to-ce/1.9.3.4/config.xml.dist @@ -0,0 +1,144 @@ + + + + + + Migration\Step\Settings\Integrity + Migration\Step\Settings\Data + + + Migration\Step\Stores\Integrity + Migration\Step\Stores\Data + Migration\Step\Stores\Volume + + + + + Migration\Step\DataIntegrity\Integrity + + + Migration\Step\Eav\Integrity + Migration\Step\Eav\Data + Migration\Step\Eav\Volume + + + Migration\Step\Customer\Integrity + Migration\Step\Customer\Data + Migration\Step\Customer\Volume + + + Migration\Step\Map\Integrity + Migration\Step\Map\Data + Migration\Step\Map\Volume + + + Migration\Step\UrlRewrite\Version191to2000 + Migration\Step\UrlRewrite\Version191to2000 + Migration\Step\UrlRewrite\Version191to2000 + + + Migration\Step\Log\Integrity + Migration\Step\Log\Data + Migration\Step\Log\Volume + + + Migration\Step\Ratings\Integrity + Migration\Step\Ratings\Data + Migration\Step\Ratings\Volume + + + Migration\Step\ConfigurablePrices\Integrity + Migration\Step\ConfigurablePrices\Data + Migration\Step\ConfigurablePrices\Volume + + + Migration\Step\OrderGrids\Integrity + Migration\Step\OrderGrids\Data + Migration\Step\OrderGrids\Volume + + + Migration\Step\TierPrice\Integrity + Migration\Step\TierPrice\Data + Migration\Step\TierPrice\Volume + + + Migration\Step\SalesIncrement\Integrity + Migration\Step\SalesIncrement\Data + Migration\Step\SalesIncrement\Volume + + + Migration\Step\PostProcessing\Data + + + + + Migration\Step\Customer\Delta + Migration\Step\Customer\Volume + + + Migration\Step\Map\Delta + Migration\Step\Map\Volume + + + Migration\Step\Log\Delta + Migration\Step\Log\Volume + + + Migration\Step\OrderGrids\Delta + Migration\Step\OrderGrids\Volume + + + Migration\Step\SalesIncrement\Delta + Migration\Step\SalesIncrement\Volume + + + + + + + + + + etc/ce-to-ce/1.9.3.4/map.xml.dist + etc/ce-to-ce/map-eav.xml.dist + etc/ce-to-ce/eav-document-groups.xml.dist + etc/ce-to-ce/eav-attribute-groups.xml.dist + etc/ce-to-ce/map-log.xml.dist + etc/ce-to-ce/log-document-groups.xml.dist + etc/ce-to-ce/settings.xml.dist + etc/ce-to-ce/map-customer.xml.dist + etc/ce-to-ce/customer-document-groups.xml.dist + etc/ce-to-ce/customer-attribute-groups.xml.dist + etc/ce-to-ce/deltalog.xml.dist + etc/ce-to-ce/order-grids-document-groups.xml.dist + etc/ce-to-ce/map-document-groups.xml.dist + etc/ce-to-ce/class-map.xml.dist + etc/ce-to-ce/1.9.3.4/map-tier-price.xml.dist + + 0 + + 0 + + + 0 + migration.log + %percent%% [%bar%] Remaining Time: %remaining% + 1 + ce-to-ce + 1.9.3.4 + SET NAMES utf8; + SET NAMES utf8; + + + diff --git a/etc/ce-to-ce/1.9.3.4/map-tier-price.xml.dist b/etc/ce-to-ce/1.9.3.4/map-tier-price.xml.dist new file mode 100644 index 000000000..153f530de --- /dev/null +++ b/etc/ce-to-ce/1.9.3.4/map-tier-price.xml.dist @@ -0,0 +1,17 @@ + + + + + + + catalog_product_entity_group_price.is_percent + + + + + diff --git a/etc/ce-to-ce/1.9.3.4/map.xml.dist b/etc/ce-to-ce/1.9.3.4/map.xml.dist new file mode 100644 index 000000000..6da515682 --- /dev/null +++ b/etc/ce-to-ce/1.9.3.4/map.xml.dist @@ -0,0 +1,1777 @@ + + + + + + + mailchimp_errors + + + mailchimp_sync_batches + + + googleshopping_attributes + + + googleshopping_items + + + googleshopping_types + + + sales_flat_creditmemo_grid + + + sales_flat_invoice_grid + + + sales_flat_order_grid + + + sales_flat_shipment_grid + + + customer_entity + + + customer_entity_datetime + + + customer_entity_decimal + + + customer_entity_int + + + customer_entity_text + + + customer_entity_varchar + + + customer_address_entity + + + customer_address_entity_datetime + + + customer_address_entity_decimal + + + customer_address_entity_int + + + customer_address_entity_text + + + customer_address_entity_varchar + + + m2_cl_* + + + url_rewrite_m2* + + + admin_assert + + + api2_acl_attribute + + + api2_acl_role + + + api2_acl_rule + + + api2_acl_user + + + api_assert + + + api_role + + + api_rule + + + api_session + + + api_user + + + log_customer + + + log_quote + + + log_summary_type + + + log_summary + + + log_url + + + log_url_info + + + catalog_category_anc_categs_index_idx + + + catalog_category_anc_categs_index_tmp + + + catalog_category_anc_products_index_idx + + + catalog_category_anc_products_index_tmp + + + catalog_category_flat_cl + + + catalog_category_product_index + + + catalog_category_product_index_cl + + + catalog_category_product_index_enbl_idx + + + catalog_category_product_index_enbl_tmp + + + catalog_category_product_index_idx + + + catalog_category_product_index_tmp + + + catalog_product_enabled_index + + + catalog_product_flat_cl + + + cataloginventory_stock_status + + + cataloginventory_stock_status_idx + + + cataloginventory_stock_status_tmp + + + catalog_category_product_cat_cl + + + catalog_product_bundle_price_index + + + catalog_product_bundle_stock_index + + + catalog_product_index_group_price + + + catalog_product_index_price + + + catalog_product_index_price* + + + catalog_product_index_tier_price + + + catalog_product_index_website + + + catalogindex_aggregation + + + catalogindex_aggregation_tag + + + catalogindex_aggregation_to_tag + + + catalogindex_minimal_price + + + catalogindex_price + + + core_layout_update + + + core_layout_link + + + widget_instance_page_layout + + + googlecheckout_api_debug + + + ogone_api_debug + + + oscommerce_import + + + oscommerce_import_type + + + oscommerce_orders + + + oscommerce_orders_products + + + oscommerce_orders_status_history + + + oscommerce_orders_total + + + oscommerce_ref + + + paygate_authorizenet_debug + + + paypal_api_debug + + + paypaluk_api_debug + + + amazonpayments_api_debug + + + chronopay_api_debug + + + cybermut_api_debug + + + cybersource_api_debug + + + eway_api_debug + + + flo2cash_api_debug + + + ideal_api_debug + + + paybox_api_debug + + + protx_api_debug + + + xmlconnect_application + + + xmlconnect_config_data + + + xmlconnect_history + + + xmlconnect_images + + + xmlconnect_notification_template + + + xmlconnect_queue + + + googlecheckout_notification + + + index_event + + + index_process + + + index_process_event + + + cataloginventory_stock_status_cl + + + catalogsearch_fulltext + + + catalogsearch_fulltext_cl + + + core_cache_tag + + + core_cache_option + + + core_cache + + + core_flag + + + core_email_queue + + + core_email_queue_recipients + + + merchandiser_category_values + + + merchandiser_vmbuild + + + dataflow_batch + + + dataflow_batch_export + + + dataflow_batch_import + + + dataflow_import_data + + + dataflow_profile + + + dataflow_profile_history + + + dataflow_session + + + core_url_rewrite + + + catalog_product_entity_url_key + + + catalogindex_eav + + + catalog_eav_attribute + + + customer_eav_attribute + + + catalog_product_index_eav + + + catalog_product_index_eav_decimal + + + catalog_product_index_eav_decimal_idx + + + catalog_product_index_eav_decimal_tmp + + + catalog_product_index_eav_idx + + + catalog_product_index_eav_tmp + + + eav_attribute + + + eav_attribute_group + + + eav_attribute_set + + + eav_entity_attribute + + + eav_entity_type + + + catalog_category_entity_url_key + + + poll + + + poll_answer + + + poll_store + + + poll_vote + + + sales_recurring_profile + + + sales_recurring_profile_order + + + tag + + + tag_properties + + + tag_relation + + + tag_summary + + + weee_discount + + + catalogsearch_result + + + log_visitor + + + log_visitor_info + + + log_visitor_online + + + core_config_data + + + s_*b_*_* + + + catalog_product_flat_* + + + catalog_category_flat_* + + + catalog_category_flat_store_* + + + googleoptimizer_code + + + core_resource + + + cron_schedule + + + admin_user + + + admin_role + + + admin_rule + + + admin_role + + + admin_rule + + + catalogrule_affected_product + + + catalog_product_super_attribute_pricing + + + core_website + + + catalog_product_entity_group_price + + + catalog_product_entity_tier_price + + + permission_block + + + permission_variable + + + googlebase_attributes + + + googlebase_items + + + googlebase_types + + + customer_flowpassword + + + catalogsearch_query + search_query + + + core_variable + variable + + + core_variable_value + variable_value + + + core_email_template + email_template + + + core_store + store + + + core_store_group + store_group + + + core_translate + translation + + + core_session + session + + + coupon_aggregated + salesrule_coupon_aggregated + + + coupon_aggregated_order + salesrule_coupon_aggregated_order + + + coupon_aggregated_updated + salesrule_coupon_aggregated_updated + + + sales_flat_order + sales_order + + + sales_flat_creditmemo + sales_creditmemo + + + sales_flat_creditmemo_comment + sales_creditmemo_comment + + + sales_flat_creditmemo_item + sales_creditmemo_item + + + sales_flat_invoice + sales_invoice + + + sales_flat_invoice_comment + sales_invoice_comment + + + sales_flat_invoice_item + sales_invoice_item + + + sales_flat_order_address + sales_order_address + + + sales_flat_order_item + sales_order_item + + + sales_flat_order_payment + sales_order_payment + + + sales_flat_order_status_history + sales_order_status_history + + + sales_flat_quote + quote + + + sales_flat_quote_address + quote_address + + + sales_flat_quote_address_item + quote_address_item + + + sales_flat_quote_item + quote_item + + + sales_flat_quote_item_option + quote_item_option + + + sales_flat_quote_payment + quote_payment + + + sales_flat_quote_shipping_rate + quote_shipping_rate + + + sales_flat_shipment + sales_shipment + + + sales_flat_shipment_comment + sales_shipment_comment + + + sales_flat_shipment_item + sales_shipment_item + + + sales_flat_shipment_track + sales_shipment_track + + + core_directory_storage + media_storage_directory_storage + + + core_file_storage + media_storage_file_storage + + + sales_billing_agreement + paypal_billing_agreement + + + sales_billing_agreement_order + paypal_billing_agreement_order + + + + + cms_page.root_template + cms_page.page_layout + + + sales_flat_order.hidden_tax_amount + sales_order.discount_tax_compensation_amount + + + sales_flat_order.base_hidden_tax_amount + sales_order.base_discount_tax_compensation_amount + + + sales_flat_order.shipping_hidden_tax_amount + sales_order.shipping_discount_tax_compensation_amount + + + sales_flat_order.base_shipping_hidden_tax_amnt + sales_order.base_shipping_discount_tax_compensation_amnt + + + sales_flat_order.hidden_tax_invoiced + sales_order.discount_tax_compensation_invoiced + + + sales_flat_order.base_hidden_tax_invoiced + sales_order.base_discount_tax_compensation_invoiced + + + sales_flat_order.hidden_tax_refunded + sales_order.discount_tax_compensation_refunded + + + sales_flat_order.base_hidden_tax_refunded + sales_order.base_discount_tax_compensation_refunded + + + sales_flat_creditmemo.hidden_tax_amount + sales_creditmemo.discount_tax_compensation_amount + + + sales_flat_creditmemo.base_hidden_tax_amount + sales_creditmemo.base_discount_tax_compensation_amount + + + sales_flat_creditmemo.shipping_hidden_tax_amount + sales_creditmemo.shipping_discount_tax_compensation_amount + + + sales_flat_creditmemo.base_shipping_hidden_tax_amnt + sales_creditmemo.base_shipping_discount_tax_compensation_amnt + + + sales_flat_creditmemo_item.hidden_tax_amount + sales_creditmemo_item.discount_tax_compensation_amount + + + sales_flat_creditmemo_item.base_hidden_tax_amount + sales_creditmemo_item.base_discount_tax_compensation_amount + + + sales_flat_invoice.hidden_tax_amount + sales_invoice.discount_tax_compensation_amount + + + sales_flat_invoice.base_hidden_tax_amount + sales_invoice.base_discount_tax_compensation_amount + + + sales_flat_invoice.shipping_hidden_tax_amount + sales_invoice.shipping_discount_tax_compensation_amount + + + sales_flat_invoice.base_shipping_hidden_tax_amnt + sales_invoice.base_shipping_discount_tax_compensation_amnt + + + sales_flat_invoice_item.hidden_tax_amount + sales_invoice_item.discount_tax_compensation_amount + + + sales_flat_invoice_item.base_hidden_tax_amount + sales_invoice_item.base_discount_tax_compensation_amount + + + sales_flat_order_item.hidden_tax_amount + sales_order_item.discount_tax_compensation_amount + + + sales_flat_order_item.base_hidden_tax_amount + sales_order_item.base_discount_tax_compensation_amount + + + sales_flat_order_item.hidden_tax_invoiced + sales_order_item.discount_tax_compensation_invoiced + + + sales_flat_order_item.base_hidden_tax_invoiced + sales_order_item.base_discount_tax_compensation_invoiced + + + sales_flat_order_item.hidden_tax_refunded + sales_order_item.discount_tax_compensation_refunded + + + sales_flat_order_item.base_hidden_tax_refunded + sales_order_item.base_discount_tax_compensation_refunded + + + sales_flat_order_item.hidden_tax_canceled + sales_order_item.discount_tax_compensation_canceled + + + sales_flat_order_payment.cc_last4 + sales_order_payment.cc_last_4 + + + sales_flat_quote_payment.cc_last4 + quote_payment.cc_last_4 + + + sales_flat_quote_address.hidden_tax_amount + quote_address.discount_tax_compensation_amount + + + sales_flat_quote_address.base_hidden_tax_amount + quote_address.base_discount_tax_compensation_amount + + + sales_flat_quote_address.shipping_hidden_tax_amount + quote_address.shipping_discount_tax_compensation_amount + + + sales_flat_quote_address.base_shipping_hidden_tax_amnt + quote_address.base_shipping_discount_tax_compensation_amnt + + + sales_flat_quote_address_item.hidden_tax_amount + quote_address_item.discount_tax_compensation_amount + + + sales_flat_quote_address_item.base_hidden_tax_amount + quote_address_item.base_discount_tax_compensation_amount + + + sales_flat_quote_item.hidden_tax_amount + quote_item.discount_tax_compensation_amount + + + sales_flat_quote_item.base_hidden_tax_amount + quote_item.base_discount_tax_compensation_amount + + + catalog_category_entity_varchar.value + + + + + + + catalog_category_entity_varchar.value + + + + + + + + catalog_category_entity_varchar.value + + + + + + + catalog_category_entity_text.value + + + + + + + catalog_product_entity_varchar.value + + + + + + + catalog_product_entity_varchar.value + + + + + + + + cms_page.root_template + + + + + + + cms_block.content + + + + cms_page.content + + + + newsletter_template.template_text + + + + core_email_template.template_text + + + + widget_instance.instance_type + + + + catalogrule.conditions_serialized + + + + catalogrule.actions_serialized + + + + salesrule.conditions_serialized + + + + salesrule.actions_serialized + + + + sales_flat_order_item.weee_tax_applied + + + + sales_flat_quote_item.weee_tax_applied + + + + sales_flat_creditmemo_item.weee_tax_applied + + + + sales_flat_invoice_item.weee_tax_applied + + + + catalog_product_entity_media_gallery.value_id + + + + rating_option_vote.remote_ip_long + + + + sendfriend_log.ip + + + + catalogsearch_query.synonym_for + + + + admin_rule.role_type + + + admin_rule.assert_id + + + core_website.is_staging + + + core_website.master_login + + + core_website.master_password + + + core_website.visibility + + + sales_order_tax.hidden + + + sales_flat_order.paypal_ipn_customer_notified + + + sales_flat_order_item.is_nominal + + + sales_flat_order_payment.paybox_request_number + + + weee_tax.entity_type_id + + + catalog_category_entity.entity_type_id + + + catalog_category_entity_datetime.entity_type_id + + + catalog_category_entity_decimal.entity_type_id + + + catalog_category_entity_int.entity_type_id + + + catalog_category_entity_text.entity_type_id + + + catalog_category_entity_varchar.entity_type_id + + + catalog_product_entity.entity_type_id + + + catalog_product_entity_datetime.entity_type_id + + + catalog_product_entity_decimal.entity_type_id + + + catalog_product_entity_gallery.entity_type_id + + + catalog_product_entity_media_gallery.entity_id + + + catalog_product_entity_int.entity_type_id + + + catalog_product_entity_text.entity_type_id + + + catalog_product_entity_varchar.entity_type_id + + + sales_flat_creditmemo.cybersource_token + + + sales_flat_invoice.cybersource_token + + + sales_flat_order_payment.ideal_transaction_checked + + + sales_flat_order_payment.cybersource_token + + + sales_flat_order_payment.ideal_issuer_title + + + sales_flat_order_payment.paybox_question_number + + + sales_flat_order_payment.ideal_issuer_id + + + sales_flat_order_payment.flo2cash_account_id + + + sales_flat_quote_payment.cybersource_token + + + sales_flat_quote_payment.ideal_issuer_id + + + sales_flat_quote_payment.ideal_issuer_list + + + sales_flat_quote_payment.paypal_payer_id + + + sales_flat_quote_payment.paypal_payer_status + + + sales_flat_quote_payment.paypal_correlation_id + + + cms_page.layout_update_xml + + + cms_page.custom_layout_update_xml + + + widget_instance.package_theme + + + newsletter_template.template_text_preprocessed + + + catalogrule.sub_is_enable + + + catalogrule.sub_simple_action + + + catalogrule.sub_discount_amount + + + catalogrule_product.sub_simple_action + + + catalogrule_product.sub_discount_amount + + + catalogsearch_query.synonym_for + + + sales_flat_invoice.customer_id + + + sales_flat_invoice.invoice_status_id + + + sales_flat_invoice.invoice_type + + + sales_flat_invoice.is_virtual + + + sales_flat_invoice.real_order_id + + + sales_flat_invoice.total_due + + + sales_flat_invoice.total_paid + + + sales_flat_invoice_item.shipment_id + + + sales_flat_order.base_custbalance_amount + + + sales_flat_order.currency_base_id + + + sales_flat_order.currency_code + + + sales_flat_order.currency_rate + + + sales_flat_order.custbalance_amount + + + sales_flat_order.is_hold + + + sales_flat_order.is_multi_payment + + + sales_flat_order.real_order_id + + + sales_flat_order.tax_percent + + + sales_flat_order.tracking_numbers + + + sales_flat_order_address.address_id + + + sales_flat_order_address.gift_message_id + + + sales_flat_order_address.tax_id + + + sales_flat_order_payment.amount + + + sales_flat_order_payment.cc_raw_request + + + sales_flat_order_payment.cc_raw_response + + + sales_flat_order_payment.customer_payment_id + + + sales_bestsellers_aggregated_daily.product_type_id + + + sales_bestsellers_aggregated_monthly.product_type_id + + + sales_bestsellers_aggregated_yearly.product_type_id + + + sales_flat_quote_payment.cc_exp_month + + + weee_tax.state + + + sendfriend_log.ip + + + rating_option_vote.remote_ip_long + + + oauth_consumer.callback_url + + + oauth_consumer.rejected_callback_url + + + oauth_token.callback_url + + + newsletter_subscriber.subscriber_firstname + + + newsletter_subscriber.subscriber_lastname + + + newsletter_subscriber.mailchimp_sync_delta + + + newsletter_subscriber.mailchimp_sync_error + + + sales_flat_order.mailchimp_sync_delta + + + sales_flat_order.mailchimp_sync_error + + + sales_flat_order.mailchimp_campaign_id + + + sales_flat_order.mailchimp_abandonedcart_flag + + + sales_flat_order.mailchimp_landing_page + + + sales_flat_order.mailchimp_sync_modified + + + sales_flat_quote.mailchimp_sync_delta + + + sales_flat_quote.mailchimp_sync_error + + + sales_flat_quote.mailchimp_deleted + + + sales_flat_quote.mailchimp_token + + + sales_flat_quote.mailchimp_abandonedcart_flag + + + sales_flat_quote.mailchimp_landing_page + + + sales_flat_quote.mailchimp_campaign_id + + + + + + + customer_entity + + + customer_entity_datetime + + + customer_entity_decimal + + + customer_entity_int + + + customer_entity_text + + + customer_entity_varchar + + + customer_address_entity + + + customer_address_entity_datetime + + + customer_address_entity_decimal + + + customer_address_entity_int + + + customer_address_entity_text + + + customer_address_entity_varchar + + + ui_bookmark + + + migration_backup_* + + + googleoptimizer_code + + + indexer_state + + + integration + + + mview_state + + + theme + + + theme_file + + + vde_theme_change + + + admin_system_messages + + + catalog_url_rewrite_product_category + + + customer_visitor + + + url_rewrite + + + layout_update + + + layout_link + + + catalog_product_flat_* + + + catalog_category_flat_* + + + catalogindex_eav + + + catalog_eav_attribute + + + catalogsearch_fulltext_index_default + + + customer_eav_attribute + + + customer_eav_attribute_website + + + catalog_product_index_eav + + + catalog_product_index_eav_decimal + + + catalog_product_index_eav_decimal_idx + + + catalog_product_index_eav_decimal_tmp + + + catalog_product_index_eav_idx + + + catalog_product_index_eav_tmp + + + catalog_category_product_index_tmp + + + eav_attribute + + + eav_attribute_group + + + eav_attribute_set + + + eav_entity_attribute + + + eav_entity_type + + + authorization_role + + + authorization_rule + + + setup_module + + + cache + + + cache_tag + + + customer_log + + + flag + + + log_customer + + + log_quote + + + log_summary_type + + + log_summary + + + log_url + + + log_url_info + + + quote_id_mask + + + session + + + sales_sequence_profile + + + sales_sequence_meta + + + sequence_invoice_* + + + sequence_creditmemo_* + + + sequence_order_* + + + sequence_shipment* + + + sequence_rma_item_* + + + vault_payment_token + + + vault_payment_token_order_payment_link + + + search_synonyms + + + eav_attribute_option_swatch + + + import_history + + + sales_creditmemo_grid + + + sales_invoice_grid + + + sales_order_grid + + + sales_shipment_grid + + + catalogsearch_fulltext_scope* + + + store_website + + + log_visitor_info + + + log_visitor_online + + + reporting_module_status + + + reporting_orders + + + reporting_system_updates + + + reporting_users + + + reporting_counts + + + admin_passwords + + + catalog_product_entity_media_gallery_value_to_entity + + + catalog_product_entity_media_gallery_value_video + + + catalog_product_entity_tier_price + + + customer_grid_flat + + + admin_user_session + + + password_reset_request_event + + + oauth_token_request_log + + + design_config_grid_flat + + + + + admin_user.interface_locale + + + + + + cataloginventory_stock.website_id + + + + + + cataloginventory_stock_item.website_id + + + + + + rating.is_active + + + + + + authorization_role.user_type + + + + + + sales_order_tax_item.amount + + + + + + sales_order_tax_item.base_amount + + + + + + sales_order_tax_item.real_amount + + + + + + sales_order_tax_item.real_base_amount + + + + + + sales_order_tax_item.taxable_item_type + + + + + + oauth_token.user_type + + + + + + widget_instance.theme_id + + + + + + sales_order_status_state.visible_on_front + + + + catalog_product_entity_media_gallery_value.entity_id + + + + catalog_product_entity_media_gallery_value.entity_id + + + catalog_product_entity_media_gallery.media_type + + + catalog_product_entity_media_gallery.disabled + + + catalog_product_entity_media_gallery_value.record_id + + + admin_user.interface_locale + + + admin_user.failures_num + + + admin_user.first_failure + + + admin_user.lock_expires + + + rating.is_active + + + sales_creditmemo.send_email + + + sales_creditmemo.customer_note + + + sales_creditmemo.customer_note_notify + + + sales_invoice.send_email + + + sales_invoice.customer_note + + + sales_invoice.customer_note_notify + + + sales_shipment.send_email + + + sales_shipment.customer_note + + + sales_shipment.customer_note_notify + + + sales_creditmemo_item.tax_ratio + + + sales_invoice_item.tax_ratio + + + authorization_role.user_type + + + cataloginventory_stock.website_id + + + cataloginventory_stock_item.website_id + + + oauth_nonce.consumer_id + + + oauth_token.user_type + + + sales_order_status_state.visible_on_front + + + widget_instance.theme_id + + + sales_order_tax_item.amount + + + sales_order_tax_item.base_amount + + + sales_order_tax_item.real_amount + + + sales_order_tax_item.real_base_amount + + + sales_order_tax_item.associated_item_id + + + sales_order_tax_item.taxable_item_type + + + sales_creditmemo_grid.updated_at + + + sales_invoice_grid.updated_at + + + sales_shipment_grid.updated_at + + + sales_order.send_email + + + checkout_agreement.mode + + + catalog_category_product.entity_id + + + cms_page.meta_title + + + quote_payment.cc_exp_month + + + weee_tax.state + + + sendfriend_log.ip + + + rating_option_vote.remote_ip_long + + + oauth_consumer.callback_url + + + oauth_consumer.rejected_callback_url + + + oauth_token.callback_url + + + + diff --git a/etc/ce-to-ee/1.9.3.4/config.xml.dist b/etc/ce-to-ee/1.9.3.4/config.xml.dist new file mode 100644 index 000000000..32d59d688 --- /dev/null +++ b/etc/ce-to-ee/1.9.3.4/config.xml.dist @@ -0,0 +1,144 @@ + + + + + + Migration\Step\Settings\Integrity + Migration\Step\Settings\Data + + + Migration\Step\Stores\Integrity + Migration\Step\Stores\Data + Migration\Step\Stores\Volume + + + + + Migration\Step\DataIntegrity\Integrity + + + Migration\Step\Eav\Integrity + Migration\Step\Eav\Data + Migration\Step\Eav\Volume + + + Migration\Step\Customer\Integrity + Migration\Step\Customer\Data + Migration\Step\Customer\Volume + + + Migration\Step\Map\Integrity + Migration\Step\Map\Data + Migration\Step\Map\Volume + + + Migration\Step\UrlRewrite\Version191to2000 + Migration\Step\UrlRewrite\Version191to2000 + Migration\Step\UrlRewrite\Version191to2000 + + + Migration\Step\Log\Integrity + Migration\Step\Log\Data + Migration\Step\Log\Volume + + + Migration\Step\Ratings\Integrity + Migration\Step\Ratings\Data + Migration\Step\Ratings\Volume + + + Migration\Step\ConfigurablePrices\Integrity + Migration\Step\ConfigurablePrices\Data + Migration\Step\ConfigurablePrices\Volume + + + Migration\Step\OrderGrids\Integrity + Migration\Step\OrderGrids\Data + Migration\Step\OrderGrids\Volume + + + Migration\Step\TierPrice\Integrity + Migration\Step\TierPrice\Data + Migration\Step\TierPrice\Volume + + + Migration\Step\SalesIncrement\Integrity + Migration\Step\SalesIncrement\Data + Migration\Step\SalesIncrement\Volume + + + Migration\Step\PostProcessing\Data + + + + + Migration\Step\Customer\Delta + Migration\Step\Customer\Volume + + + Migration\Step\Map\Delta + Migration\Step\Map\Volume + + + Migration\Step\Log\Delta + Migration\Step\Log\Volume + + + Migration\Step\OrderGrids\Delta + Migration\Step\OrderGrids\Volume + + + Migration\Step\SalesIncrement\Delta + Migration\Step\SalesIncrement\Volume + + + + + + + + + + etc/ce-to-ee/1.9.3.4/map.xml.dist + etc/ce-to-ee/map-eav.xml.dist + etc/ce-to-ee/eav-document-groups.xml.dist + etc/ce-to-ee/eav-attribute-groups.xml.dist + etc/ce-to-ee/map-log.xml.dist + etc/ce-to-ee/log-document-groups.xml.dist + etc/ce-to-ee/settings.xml.dist + etc/ce-to-ee/map-customer.xml.dist + etc/ce-to-ee/customer-document-groups.xml.dist + etc/ce-to-ee/customer-attribute-groups.xml.dist + etc/ce-to-ee/deltalog.xml.dist + etc/ce-to-ee/order-grids-document-groups.xml.dist + etc/ce-to-ee/map-document-groups.xml.dist + etc/ce-to-ee/class-map.xml.dist + etc/ce-to-ee/1.9.3.4/map-tier-price.xml.dist + + 0 + + 0 + + + 0 + migration.log + %percent%% [%bar%] Remaining Time: %remaining% + 1 + ce-to-ee + 1.9.3.4 + SET NAMES utf8; + SET NAMES utf8; + + + diff --git a/etc/ce-to-ee/1.9.3.4/map-tier-price.xml.dist b/etc/ce-to-ee/1.9.3.4/map-tier-price.xml.dist new file mode 100644 index 000000000..db03f1ff0 --- /dev/null +++ b/etc/ce-to-ee/1.9.3.4/map-tier-price.xml.dist @@ -0,0 +1,25 @@ + + + + + + + catalog_product_entity_group_price.is_percent + + + catalog_product_entity_tier_price.entity_id + catalog_product_entity_tier_price.row_id + + + catalog_product_entity_group_price.entity_id + catalog_product_entity_group_price.row_id + + + + + diff --git a/etc/ce-to-ee/1.9.3.4/map.xml.dist b/etc/ce-to-ee/1.9.3.4/map.xml.dist new file mode 100644 index 000000000..633f0f0c0 --- /dev/null +++ b/etc/ce-to-ee/1.9.3.4/map.xml.dist @@ -0,0 +1,2873 @@ + + + + + + + googleshopping_attributes + + + googleshopping_items + + + googleshopping_types + + + sales_flat_creditmemo_grid + + + sales_flat_invoice_grid + + + sales_flat_order_grid + + + sales_flat_shipment_grid + + + customer_entity + + + customer_entity_datetime + + + customer_entity_decimal + + + customer_entity_int + + + customer_entity_text + + + customer_entity_varchar + + + customer_address_entity + + + customer_address_entity_datetime + + + customer_address_entity_decimal + + + customer_address_entity_int + + + customer_address_entity_text + + + customer_address_entity_varchar + + + m2_cl_* + + + url_rewrite_m2* + + + admin_assert + + + api2_acl_attribute + + + api2_acl_role + + + api2_acl_rule + + + api2_acl_user + + + api_assert + + + api_role + + + api_rule + + + api_session + + + api_user + + + log_customer + + + log_quote + + + log_summary_type + + + log_summary + + + log_url + + + log_url_info + + + catalog_category_anc_categs_index_idx + + + catalog_category_anc_categs_index_tmp + + + catalog_category_anc_products_index_idx + + + catalog_category_anc_products_index_tmp + + + catalog_category_flat_cl + + + catalog_category_product_index + + + catalog_category_product_index_cl + + + catalog_category_product_index_enbl_idx + + + catalog_category_product_index_enbl_tmp + + + catalog_category_product_index_idx + + + catalog_category_product_index_tmp + + + catalog_product_enabled_index + + + catalog_product_flat_cl + + + cataloginventory_stock_status + + + cataloginventory_stock_status_idx + + + cataloginventory_stock_status_tmp + + + catalog_category_product_cat_cl + + + catalog_product_bundle_price_index + + + catalog_product_bundle_stock_index + + + catalog_product_index_group_price + + + catalog_product_index_price + + + catalog_product_index_price* + + + catalog_product_index_tier_price + + + catalog_product_index_website + + + catalogindex_aggregation + + + catalogindex_aggregation_tag + + + catalogindex_aggregation_to_tag + + + catalogindex_minimal_price + + + catalogindex_price + + + core_layout_update + + + core_layout_link + + + widget_instance_page_layout + + + googlecheckout_api_debug + + + ogone_api_debug + + + oscommerce_import + + + oscommerce_import_type + + + oscommerce_orders + + + oscommerce_orders_products + + + oscommerce_orders_status_history + + + oscommerce_orders_total + + + oscommerce_ref + + + paygate_authorizenet_debug + + + paypal_api_debug + + + paypaluk_api_debug + + + amazonpayments_api_debug + + + chronopay_api_debug + + + cybermut_api_debug + + + cybersource_api_debug + + + eway_api_debug + + + flo2cash_api_debug + + + ideal_api_debug + + + paybox_api_debug + + + protx_api_debug + + + xmlconnect_application + + + xmlconnect_config_data + + + xmlconnect_history + + + xmlconnect_images + + + xmlconnect_notification_template + + + xmlconnect_queue + + + googlecheckout_notification + + + index_event + + + index_process + + + index_process_event + + + cataloginventory_stock_status_cl + + + catalogsearch_fulltext + + + catalogsearch_fulltext_cl + + + core_cache_tag + + + core_cache_option + + + core_cache + + + core_flag + + + core_email_queue + + + core_email_queue_recipients + + + merchandiser_category_values + + + merchandiser_vmbuild + + + dataflow_batch + + + dataflow_batch_export + + + dataflow_batch_import + + + dataflow_import_data + + + dataflow_profile + + + dataflow_profile_history + + + dataflow_session + + + core_url_rewrite + + + catalog_product_entity_url_key + + + catalogindex_eav + + + catalog_eav_attribute + + + customer_eav_attribute + + + catalog_product_index_eav + + + catalog_product_index_eav_decimal + + + catalog_product_index_eav_decimal_idx + + + catalog_product_index_eav_decimal_tmp + + + catalog_product_index_eav_idx + + + catalog_product_index_eav_tmp + + + eav_attribute + + + eav_attribute_group + + + eav_attribute_set + + + eav_entity_attribute + + + eav_entity_type + + + catalog_category_entity_url_key + + + poll + + + poll_answer + + + poll_store + + + poll_vote + + + sales_recurring_profile + + + sales_recurring_profile_order + + + tag + + + tag_properties + + + tag_relation + + + tag_summary + + + weee_discount + + + catalogsearch_result + + + log_visitor + + + log_visitor_info + + + log_visitor_online + + + core_config_data + + + s_*b_*_* + + + catalog_product_flat_* + + + catalog_category_flat_* + + + catalog_category_flat_store_* + + + googleoptimizer_code + + + core_resource + + + cron_schedule + + + admin_user + + + admin_role + + + admin_rule + + + admin_role + + + admin_rule + + + catalogrule_affected_product + + + catalog_product_super_attribute_pricing + + + core_website + + + catalog_product_entity_group_price + + + catalog_product_entity_tier_price + + + permission_block + + + permission_variable + + + googlebase_attributes + + + googlebase_items + + + googlebase_types + + + customer_flowpassword + + + catalogsearch_query + search_query + + + core_variable + variable + + + core_variable_value + variable_value + + + core_email_template + email_template + + + core_store + store + + + core_store_group + store_group + + + core_translate + translation + + + core_session + session + + + coupon_aggregated + salesrule_coupon_aggregated + + + coupon_aggregated_order + salesrule_coupon_aggregated_order + + + coupon_aggregated_updated + salesrule_coupon_aggregated_updated + + + sales_flat_order + sales_order + + + sales_flat_creditmemo + sales_creditmemo + + + sales_flat_creditmemo_comment + sales_creditmemo_comment + + + sales_flat_creditmemo_item + sales_creditmemo_item + + + sales_flat_invoice + sales_invoice + + + sales_flat_invoice_comment + sales_invoice_comment + + + sales_flat_invoice_item + sales_invoice_item + + + sales_flat_order_address + sales_order_address + + + sales_flat_order_item + sales_order_item + + + sales_flat_order_payment + sales_order_payment + + + sales_flat_order_status_history + sales_order_status_history + + + sales_flat_quote + quote + + + sales_flat_quote_address + quote_address + + + sales_flat_quote_address_item + quote_address_item + + + sales_flat_quote_item + quote_item + + + sales_flat_quote_item_option + quote_item_option + + + sales_flat_quote_payment + quote_payment + + + sales_flat_quote_shipping_rate + quote_shipping_rate + + + sales_flat_shipment + sales_shipment + + + sales_flat_shipment_comment + sales_shipment_comment + + + sales_flat_shipment_item + sales_shipment_item + + + sales_flat_shipment_track + sales_shipment_track + + + core_directory_storage + media_storage_directory_storage + + + core_file_storage + media_storage_file_storage + + + sales_billing_agreement + paypal_billing_agreement + + + sales_billing_agreement_order + paypal_billing_agreement_order + + + + + cms_page.root_template + cms_page.page_layout + + + sales_flat_order.hidden_tax_amount + sales_order.discount_tax_compensation_amount + + + sales_flat_order.base_hidden_tax_amount + sales_order.base_discount_tax_compensation_amount + + + sales_flat_order.shipping_hidden_tax_amount + sales_order.shipping_discount_tax_compensation_amount + + + sales_flat_order.base_shipping_hidden_tax_amnt + sales_order.base_shipping_discount_tax_compensation_amnt + + + sales_flat_order.hidden_tax_invoiced + sales_order.discount_tax_compensation_invoiced + + + sales_flat_order.base_hidden_tax_invoiced + sales_order.base_discount_tax_compensation_invoiced + + + sales_flat_order.hidden_tax_refunded + sales_order.discount_tax_compensation_refunded + + + sales_flat_order.base_hidden_tax_refunded + sales_order.base_discount_tax_compensation_refunded + + + sales_flat_creditmemo.hidden_tax_amount + sales_creditmemo.discount_tax_compensation_amount + + + sales_flat_creditmemo.base_hidden_tax_amount + sales_creditmemo.base_discount_tax_compensation_amount + + + sales_flat_creditmemo.shipping_hidden_tax_amount + sales_creditmemo.shipping_discount_tax_compensation_amount + + + sales_flat_creditmemo.base_shipping_hidden_tax_amnt + sales_creditmemo.base_shipping_discount_tax_compensation_amnt + + + sales_flat_creditmemo_item.hidden_tax_amount + sales_creditmemo_item.discount_tax_compensation_amount + + + sales_flat_creditmemo_item.base_hidden_tax_amount + sales_creditmemo_item.base_discount_tax_compensation_amount + + + sales_flat_invoice.hidden_tax_amount + sales_invoice.discount_tax_compensation_amount + + + sales_flat_invoice.base_hidden_tax_amount + sales_invoice.base_discount_tax_compensation_amount + + + sales_flat_invoice.shipping_hidden_tax_amount + sales_invoice.shipping_discount_tax_compensation_amount + + + sales_flat_invoice.base_shipping_hidden_tax_amnt + sales_invoice.base_shipping_discount_tax_compensation_amnt + + + sales_flat_invoice_item.hidden_tax_amount + sales_invoice_item.discount_tax_compensation_amount + + + sales_flat_invoice_item.base_hidden_tax_amount + sales_invoice_item.base_discount_tax_compensation_amount + + + sales_flat_order_item.hidden_tax_amount + sales_order_item.discount_tax_compensation_amount + + + sales_flat_order_item.base_hidden_tax_amount + sales_order_item.base_discount_tax_compensation_amount + + + sales_flat_order_item.hidden_tax_invoiced + sales_order_item.discount_tax_compensation_invoiced + + + sales_flat_order_item.base_hidden_tax_invoiced + sales_order_item.base_discount_tax_compensation_invoiced + + + sales_flat_order_item.hidden_tax_refunded + sales_order_item.discount_tax_compensation_refunded + + + sales_flat_order_item.base_hidden_tax_refunded + sales_order_item.base_discount_tax_compensation_refunded + + + sales_flat_order_item.hidden_tax_canceled + sales_order_item.discount_tax_compensation_canceled + + + sales_flat_order_payment.cc_last4 + sales_order_payment.cc_last_4 + + + sales_flat_quote_payment.cc_last4 + quote_payment.cc_last_4 + + + sales_flat_quote_address.hidden_tax_amount + quote_address.discount_tax_compensation_amount + + + sales_flat_quote_address.base_hidden_tax_amount + quote_address.base_discount_tax_compensation_amount + + + sales_flat_quote_address.shipping_hidden_tax_amount + quote_address.shipping_discount_tax_compensation_amount + + + sales_flat_quote_address.base_shipping_hidden_tax_amnt + quote_address.base_shipping_discount_tax_compensation_amnt + + + sales_flat_quote_address_item.hidden_tax_amount + quote_address_item.discount_tax_compensation_amount + + + sales_flat_quote_address_item.base_hidden_tax_amount + quote_address_item.base_discount_tax_compensation_amount + + + sales_flat_quote_item.hidden_tax_amount + quote_item.discount_tax_compensation_amount + + + sales_flat_quote_item.base_hidden_tax_amount + quote_item.base_discount_tax_compensation_amount + + + catalog_category_entity_datetime.entity_id + catalog_category_entity_datetime.row_id + + + catalog_category_entity_decimal.entity_id + catalog_category_entity_decimal.row_id + + + catalog_category_entity_int.entity_id + catalog_category_entity_int.row_id + + + catalog_category_entity_text.entity_id + catalog_category_entity_text.row_id + + + catalog_category_entity_varchar.entity_id + catalog_category_entity_varchar.row_id + + + catalog_product_entity_datetime.entity_id + catalog_product_entity_datetime.row_id + + + catalog_product_entity_decimal.entity_id + catalog_product_entity_decimal.row_id + + + catalog_product_entity_gallery.entity_id + catalog_product_entity_gallery.row_id + + + catalog_product_entity_int.entity_id + catalog_product_entity_int.row_id + + + catalog_product_entity_text.entity_id + catalog_product_entity_text.row_id + + + catalog_product_entity_varchar.entity_id + catalog_product_entity_varchar.row_id + + + catalogrule_customer_group.rule_id + catalogrule_customer_group.row_id + + + catalogrule_website.rule_id + catalogrule_website.row_id + + + salesrule_customer_group.rule_id + salesrule_customer_group.row_id + + + salesrule_product_attribute.rule_id + salesrule_product_attribute.row_id + + + salesrule_website.rule_id + salesrule_website.row_id + + + cms_block_store.block_id + cms_block_store.row_id + + + cms_page_store.page_id + cms_page_store.row_id + + + catalog_product_entity_tier_price.entity_id + catalog_product_entity_tier_price.row_id + + + catalog_category_entity_varchar.value + + + + + + + catalog_category_entity_varchar.value + + + + + + + + catalog_category_entity_varchar.value + + + + + + + catalog_category_entity_text.value + + + + + + + catalog_product_entity_varchar.value + + + + + + + catalog_product_entity_varchar.value + + + + + + + + cms_page.root_template + + + + + + + cms_block.content + + + + cms_page.content + + + + newsletter_template.template_text + + + + core_email_template.template_text + + + + widget_instance.instance_type + + + + catalogrule.conditions_serialized + + + + catalogrule.actions_serialized + + + + salesrule.conditions_serialized + + + + salesrule.actions_serialized + + + + sales_flat_order_item.weee_tax_applied + + + + sales_flat_quote_item.weee_tax_applied + + + + sales_flat_creditmemo_item.weee_tax_applied + + + + sales_flat_invoice_item.weee_tax_applied + + + + rating_option_vote.remote_ip_long + + + + sendfriend_log.ip + + + + catalog_product_entity_media_gallery.value_id + + + + catalogrule.rule_id + + + + + + salesrule.rule_id + + + + + + catalog_category_entity.entity_id + + + + + + catalog_product_entity.entity_id + + + + + + cms_block.block_id + + + + + + cms_page.page_id + + + + + + catalogsearch_query.synonym_for + + + + admin_rule.role_type + + + admin_rule.assert_id + + + core_website.is_staging + + + core_website.master_login + + + core_website.master_password + + + core_website.visibility + + + sales_order_tax.hidden + + + sales_flat_order.paypal_ipn_customer_notified + + + sales_flat_order_item.is_nominal + + + sales_flat_order_payment.paybox_request_number + + + weee_tax.entity_type_id + + + catalog_category_entity.entity_type_id + + + catalog_category_entity_datetime.entity_type_id + + + catalog_category_entity_decimal.entity_type_id + + + catalog_category_entity_int.entity_type_id + + + catalog_category_entity_text.entity_type_id + + + catalog_category_entity_varchar.entity_type_id + + + catalog_product_entity.entity_type_id + + + catalog_product_entity_datetime.entity_type_id + + + catalog_product_entity_decimal.entity_type_id + + + catalog_product_entity_gallery.entity_type_id + + + catalog_product_entity_media_gallery.entity_id + + + catalog_product_entity_int.entity_type_id + + + catalog_product_entity_text.entity_type_id + + + catalog_product_entity_varchar.entity_type_id + + + sales_flat_creditmemo.cybersource_token + + + sales_flat_invoice.cybersource_token + + + sales_flat_order_payment.ideal_transaction_checked + + + sales_flat_order_payment.cybersource_token + + + sales_flat_order_payment.ideal_issuer_title + + + sales_flat_order_payment.paybox_question_number + + + sales_flat_order_payment.ideal_issuer_id + + + sales_flat_order_payment.flo2cash_account_id + + + sales_flat_quote_payment.cybersource_token + + + sales_flat_quote_payment.ideal_issuer_id + + + sales_flat_quote_payment.ideal_issuer_list + + + sales_flat_quote_payment.paypal_payer_id + + + sales_flat_quote_payment.paypal_payer_status + + + sales_flat_quote_payment.paypal_correlation_id + + + cms_page.layout_update_xml + + + cms_page.custom_layout_update_xml + + + widget_instance.package_theme + + + newsletter_template.template_text_preprocessed + + + catalogsearch_query.synonym_for + + + catalogrule.sub_is_enable + + + catalogrule.sub_simple_action + + + catalogrule.sub_discount_amount + + + catalogrule_product.sub_simple_action + + + catalogrule_product.sub_discount_amount + + + sales_flat_invoice.customer_id + + + sales_flat_invoice.invoice_status_id + + + sales_flat_invoice.invoice_type + + + sales_flat_invoice.is_virtual + + + sales_flat_invoice.real_order_id + + + sales_flat_invoice.total_due + + + sales_flat_invoice.total_paid + + + sales_flat_invoice_item.shipment_id + + + sales_flat_order.base_custbalance_amount + + + sales_flat_order.currency_base_id + + + sales_flat_order.currency_code + + + sales_flat_order.currency_rate + + + sales_flat_order.custbalance_amount + + + sales_flat_order.is_hold + + + sales_flat_order.is_multi_payment + + + sales_flat_order.real_order_id + + + sales_flat_order.tax_percent + + + sales_flat_order.tracking_numbers + + + sales_flat_order_address.address_id + + + sales_flat_order_address.gift_message_id + + + sales_flat_order_address.tax_id + + + sales_flat_order_payment.amount + + + sales_flat_order_payment.cc_raw_request + + + sales_flat_order_payment.cc_raw_response + + + sales_flat_order_payment.customer_payment_id + + + sales_bestsellers_aggregated_daily.product_type_id + + + sales_bestsellers_aggregated_monthly.product_type_id + + + sales_bestsellers_aggregated_yearly.product_type_id + + + sales_flat_quote_payment.cc_exp_month + + + weee_tax.state + + + sendfriend_log.ip + + + rating_option_vote.remote_ip_long + + + oauth_consumer.callback_url + + + oauth_consumer.rejected_callback_url + + + oauth_token.callback_url + + + + + + + customer_entity + + + customer_entity_datetime + + + customer_entity_decimal + + + customer_entity_int + + + customer_entity_text + + + customer_entity_varchar + + + customer_address_entity + + + customer_address_entity_datetime + + + customer_address_entity_decimal + + + customer_address_entity_int + + + customer_address_entity_text + + + customer_address_entity_varchar + + + ui_bookmark + + + migration_backup_* + + + googleoptimizer_code + + + indexer_state + + + integration + + + mview_state + + + theme + + + theme_file + + + vde_theme_change + + + admin_system_messages + + + catalog_url_rewrite_product_category + + + customer_visitor + + + url_rewrite + + + layout_update + + + layout_link + + + catalog_product_flat_* + + + catalog_category_flat_* + + + catalogindex_eav + + + catalog_eav_attribute + + + catalogsearch_fulltext_index_default + + + customer_eav_attribute + + + customer_eav_attribute_website + + + catalog_product_index_eav + + + catalog_product_index_eav_decimal + + + catalog_product_index_eav_decimal_idx + + + catalog_product_index_eav_decimal_tmp + + + catalog_product_index_eav_idx + + + catalog_product_index_eav_tmp + + + catalog_category_product_index_tmp + + + eav_attribute + + + eav_attribute_group + + + eav_attribute_set + + + eav_entity_attribute + + + eav_entity_type + + + authorization_role + + + authorization_rule + + + setup_module + + + cache + + + cache_tag + + + customer_log + + + flag + + + log_customer + + + log_quote + + + log_summary_type + + + log_summary + + + log_url + + + log_url_info + + + quote_id_mask + + + session + + + sales_sequence_profile + + + sales_sequence_meta + + + sequence_invoice_* + + + sequence_creditmemo_* + + + sequence_order_* + + + sequence_shipment* + + + sequence_rma_item_* + + + catalogsearch_recommendations + + + enterprise_admin_passwords + + + magento_banner + + + magento_banner_catalogrule + + + magento_banner_content + + + magento_banner_customersegment + + + magento_banner_salesrule + + + magento_catalogevent_event + + + magento_catalogevent_event_image + + + magento_catalogpermissions + + + magento_catalogpermissions_index + + + magento_catalogpermissions_index_product + + + magento_catalogpermissions_index_product_tmp + + + magento_catalogpermissions_index_tmp + + + magento_customerbalance + + + magento_customerbalance_history + + + magento_customercustomattributes_sales_flat_order + + + magento_customercustomattributes_sales_flat_order_address + + + magento_customercustomattributes_sales_flat_quote + + + magento_customercustomattributes_sales_flat_quote_address + + + magento_customersegment_customer + + + magento_customersegment_event + + + magento_customersegment_segment + + + magento_customersegment_website + + + magento_giftcard_amount + + + magento_giftcardaccount + + + magento_giftcardaccount_history + + + magento_giftcardaccount_pool + + + magento_giftregistry_data + + + magento_giftregistry_entity + + + magento_giftregistry_item + + + magento_giftregistry_item_option + + + magento_giftregistry_label + + + magento_giftregistry_person + + + magento_giftregistry_type + + + magento_giftregistry_type_info + + + magento_giftwrapping + + + magento_giftwrapping_store_attributes + + + magento_giftwrapping_website + + + magento_invitation + + + magento_invitation_status_history + + + magento_invitation_track + + + magento_logging_event + + + magento_logging_event_changes + + + magento_reminder_rule + + + magento_reminder_rule_coupon + + + magento_reminder_rule_log + + + magento_reminder_rule_website + + + magento_reminder_template + + + magento_reward + + + magento_reward_history + + + magento_reward_rate + + + magento_reward_salesrule + + + magento_rma + + + magento_rma_grid + + + sales_creditmemo_grid + + + sales_invoice_grid + + + sales_order_grid + + + sales_shipment_grid + + + magento_rma_item_eav_attribute + + + magento_rma_item_eav_attribute_website + + + magento_rma_item_entity + + + magento_rma_item_entity_datetime + + + magento_rma_item_entity_decimal + + + magento_rma_item_entity_int + + + magento_rma_item_entity_text + + + magento_rma_item_entity_varchar + + + magento_rma_item_form_attribute + + + magento_rma_shipping_label + + + magento_rma_status_history + + + magento_sales_creditmemo_grid_archive + + + magento_sales_invoice_grid_archive + + + magento_sales_order_grid_archive + + + store_website + + + support_report + + + magento_sales_shipment_grid_archive + + + magento_scheduled_operations + + + magento_targetrule + + + magento_targetrule_customersegment + + + magento_targetrule_index + + + magento_targetrule_index_crosssell + + + magento_targetrule_index_crosssell_product + + + magento_targetrule_index_related + + + magento_targetrule_index_related_product + + + magento_targetrule_index_upsell + + + magento_targetrule_index_upsell_product + + + magento_targetrule_product + + + magento_versionscms_hierarchy_lock + + + magento_versionscms_hierarchy_metadata + + + magento_versionscms_hierarchy_node + + + magento_versionscms_increment + + + magento_versionscms_page_revision + + + magento_versionscms_page_version + + + paypal_billing_agreement + + + paypal_billing_agreement_order + + + eav_attribute_option_swatch + + + import_history + + + catalogsearch_fulltext_scope* + + + log_visitor_info + + + log_visitor_online + + + reporting_module_status + + + reporting_orders + + + reporting_system_updates + + + reporting_users + + + reporting_counts + + + queue + + + queue_message + + + queue_message_status + + + admin_passwords + + + support_backup + + + support_backup_item + + + catalog_product_entity_media_gallery_value_to_entity + + + catalog_product_entity_media_gallery_value_video + + + catalog_product_entity_tier_price + + + customer_grid_flat + + + visual_merchandiser_rule + + + oauth_token_request_log + + + design_config_grid_flat + + + admin_user_session + + + magento_salesrule_filter + + + multiinventory_warehouse + + + password_reset_request_event + + + queue_lock + + + quote_preview + + + search_synonyms + + + sequence_catalog_category + + + sequence_catalogrule + + + sequence_cms_block + + + sequence_cms_page + + + sequence_product + + + sequence_salesrule + + + staging_update + + + vault_payment_token + + + vault_payment_token_order_payment_link + + + + + admin_user.interface_locale + + + + + + cataloginventory_stock.website_id + + + + + + cataloginventory_stock_item.website_id + + + + + + rating.is_active + + + + + + authorization_role.user_type + + + + + + sales_order_tax_item.amount + + + + + + sales_order_tax_item.base_amount + + + + + + sales_order_tax_item.real_amount + + + + + + sales_order_tax_item.real_base_amount + + + + + + sales_order_tax_item.taxable_item_type + + + + + + oauth_token.user_type + + + + + + widget_instance.theme_id + + + + + + sales_order_status_state.visible_on_front + + + + catalog_product_entity_media_gallery_value.entity_id + + + + catalog_category_entity.row_id + + + + + + catalog_product_entity.row_id + + + + + + catalogrule.row_id + + + + + + cms_block.row_id + + + + + + cms_page.row_id + + + + + + salesrule.row_id + + + + + + catalog_product_entity_media_gallery_value.entity_id + + + catalog_product_entity_media_gallery.media_type + + + catalog_product_entity_media_gallery.disabled + + + catalog_product_entity_media_gallery_value.record_id + + + admin_user.interface_locale + + + rating.is_active + + + sales_creditmemo.send_email + + + sales_creditmemo.customer_note + + + sales_creditmemo.customer_note_notify + + + sales_invoice.send_email + + + sales_invoice.customer_note + + + sales_invoice.customer_note_notify + + + sales_shipment.send_email + + + sales_shipment.customer_note + + + sales_shipment.customer_note_notify + + + sales_creditmemo_item.tax_ratio + + + sales_invoice_item.tax_ratio + + + authorization_role.user_type + + + cataloginventory_stock.website_id + + + cataloginventory_stock_item.website_id + + + oauth_nonce.consumer_id + + + oauth_token.user_type + + + sales_order_status_state.visible_on_front + + + widget_instance.theme_id + + + sales_order_tax_item.amount + + + sales_order_tax_item.base_amount + + + sales_order_tax_item.real_amount + + + sales_order_tax_item.real_base_amount + + + sales_order_tax_item.associated_item_id + + + sales_order_tax_item.taxable_item_type + + + sales_creditmemo_grid.updated_at + + + sales_invoice_grid.updated_at + + + sales_shipment_grid.updated_at + + + sales_order.send_email + + + admin_user.failures_num + + + admin_user.first_failure + + + admin_user.lock_expires + + + cms_page.published_revision_id + + + cms_page.website_root + + + cms_page.under_version_control + + + quote.customer_balance_amount_used + + + quote.base_customer_bal_amount_used + + + quote.use_customer_balance + + + quote.gift_cards + + + quote.gift_cards_amount + + + quote.base_gift_cards_amount + + + quote.gift_cards_amount_used + + + quote.base_gift_cards_amount_used + + + quote.gw_id + + + quote.gw_allow_gift_receipt + + + quote.gw_add_card + + + quote.gw_base_price + + + quote.gw_price + + + quote.gw_items_base_price + + + quote.gw_items_price + + + quote.gw_card_base_price + + + quote.gw_card_price + + + quote.gw_base_tax_amount + + + quote.gw_tax_amount + + + quote.gw_items_base_tax_amount + + + quote.gw_items_tax_amount + + + quote.gw_card_base_tax_amount + + + quote.gw_card_tax_amount + + + quote.use_reward_points + + + quote.reward_points_balance + + + quote.base_reward_currency_amount + + + quote.reward_currency_amount + + + quote_address.base_customer_balance_amount + + + quote_address.customer_balance_amount + + + quote_address.gift_cards_amount + + + quote_address.base_gift_cards_amount + + + quote_address.gift_cards + + + quote_address.used_gift_cards + + + quote_address.gw_id + + + quote_address.gw_allow_gift_receipt + + + quote_address.gw_add_card + + + quote_address.gw_base_price + + + quote_address.gw_price + + + quote_address.gw_items_base_price + + + quote_address.gw_items_price + + + quote_address.gw_card_base_price + + + quote_address.gw_card_price + + + quote_address.gw_base_tax_amount + + + quote_address.gw_tax_amount + + + quote_address.gw_items_base_tax_amount + + + quote_address.gw_items_tax_amount + + + quote_address.gw_card_base_tax_amount + + + quote_address.gw_card_tax_amount + + + quote_address.reward_points_balance + + + quote_address.base_reward_currency_amount + + + quote_address.reward_currency_amount + + + quote_address.giftregistry_item_id + + + quote_address_item.gw_id + + + quote_address_item.gw_base_price + + + quote_address_item.gw_price + + + quote_address_item.gw_base_tax_amount + + + quote_address_item.gw_tax_amount + + + quote_item.gw_id + + + quote_item.gw_base_price + + + quote_item.gw_price + + + quote_item.gw_base_tax_amount + + + quote_item.gw_tax_amount + + + quote_item.event_id + + + quote_item.giftregistry_item_id + + + sales_creditmemo.base_customer_balance_amount + + + sales_creditmemo.customer_balance_amount + + + sales_creditmemo.bs_customer_bal_total_refunded + + + sales_creditmemo.customer_bal_total_refunded + + + sales_creditmemo.base_gift_cards_amount + + + sales_creditmemo.gift_cards_amount + + + sales_creditmemo.gw_base_price + + + sales_creditmemo.gw_price + + + sales_creditmemo.gw_items_base_price + + + sales_creditmemo.gw_items_price + + + sales_creditmemo.gw_card_base_price + + + sales_creditmemo.gw_card_price + + + sales_creditmemo.gw_base_tax_amount + + + sales_creditmemo.gw_tax_amount + + + sales_creditmemo.gw_items_base_tax_amount + + + sales_creditmemo.gw_items_tax_amount + + + sales_creditmemo.gw_card_base_tax_amount + + + sales_creditmemo.gw_card_tax_amount + + + sales_creditmemo.base_reward_currency_amount + + + sales_creditmemo.reward_currency_amount + + + sales_creditmemo.reward_points_balance + + + sales_creditmemo.reward_points_balance_refund + + + sales_invoice.base_customer_balance_amount + + + sales_invoice.customer_balance_amount + + + sales_invoice.base_gift_cards_amount + + + sales_invoice.gift_cards_amount + + + sales_invoice.gw_base_price + + + sales_invoice.gw_price + + + sales_invoice.gw_items_base_price + + + sales_invoice.gw_items_price + + + sales_invoice.gw_card_base_price + + + sales_invoice.gw_card_price + + + sales_invoice.gw_base_tax_amount + + + sales_invoice.gw_tax_amount + + + sales_invoice.gw_items_base_tax_amount + + + sales_invoice.gw_items_tax_amount + + + sales_invoice.gw_card_base_tax_amount + + + sales_invoice.gw_card_tax_amount + + + sales_invoice.base_reward_currency_amount + + + sales_invoice.reward_currency_amount + + + sales_invoice.reward_points_balance + + + sales_order.base_customer_balance_amount + + + sales_order.customer_balance_amount + + + sales_order.base_customer_balance_invoiced + + + sales_order.customer_balance_invoiced + + + sales_order.base_customer_balance_refunded + + + sales_order.customer_balance_refunded + + + sales_order.bs_customer_bal_total_refunded + + + sales_order.customer_bal_total_refunded + + + sales_order.gift_cards + + + sales_order.base_gift_cards_amount + + + sales_order.gift_cards_amount + + + sales_order.base_gift_cards_invoiced + + + sales_order.gift_cards_invoiced + + + sales_order.base_gift_cards_refunded + + + sales_order.gift_cards_refunded + + + sales_order.gw_id + + + sales_order.gw_allow_gift_receipt + + + sales_order.gw_add_card + + + sales_order.gw_base_price + + + sales_order.gw_price + + + sales_order.gw_items_base_price + + + sales_order.gw_items_price + + + sales_order.gw_card_base_price + + + sales_order.gw_card_price + + + sales_order.gw_base_tax_amount + + + sales_order.gw_tax_amount + + + sales_order.gw_items_base_tax_amount + + + sales_order.gw_items_tax_amount + + + sales_order.gw_card_base_tax_amount + + + sales_order.gw_card_tax_amount + + + sales_order.gw_base_price_invoiced + + + sales_order.gw_price_invoiced + + + sales_order.gw_items_base_price_invoiced + + + sales_order.gw_items_price_invoiced + + + sales_order.gw_card_base_price_invoiced + + + sales_order.gw_card_price_invoiced + + + sales_order.gw_base_tax_amount_invoiced + + + sales_order.gw_tax_amount_invoiced + + + sales_order.gw_items_base_tax_invoiced + + + sales_order.gw_items_tax_invoiced + + + sales_order.gw_card_base_tax_invoiced + + + sales_order.gw_card_tax_invoiced + + + sales_order.gw_base_price_refunded + + + sales_order.gw_price_refunded + + + sales_order.gw_items_base_price_refunded + + + sales_order.gw_items_price_refunded + + + sales_order.gw_card_base_price_refunded + + + sales_order.gw_card_price_refunded + + + sales_order.gw_base_tax_amount_refunded + + + sales_order.gw_tax_amount_refunded + + + sales_order.gw_items_base_tax_refunded + + + sales_order.gw_items_tax_refunded + + + sales_order.gw_card_base_tax_refunded + + + sales_order.gw_card_tax_refunded + + + sales_order.reward_points_balance + + + sales_order.base_reward_currency_amount + + + sales_order.reward_currency_amount + + + sales_order.base_rwrd_crrncy_amt_invoiced + + + sales_order.rwrd_currency_amount_invoiced + + + sales_order.base_rwrd_crrncy_amnt_refnded + + + sales_order.rwrd_crrncy_amnt_refunded + + + sales_order.reward_points_balance_refund + + + sales_order_address.giftregistry_item_id + + + sales_order_item.qty_returned + + + sales_order_item.gw_id + + + sales_order_item.gw_base_price + + + sales_order_item.gw_price + + + sales_order_item.gw_base_tax_amount + + + sales_order_item.gw_tax_amount + + + sales_order_item.gw_base_price_invoiced + + + sales_order_item.gw_price_invoiced + + + sales_order_item.gw_base_tax_amount_invoiced + + + sales_order_item.gw_tax_amount_invoiced + + + sales_order_item.gw_base_price_refunded + + + sales_order_item.gw_price_refunded + + + sales_order_item.gw_base_tax_amount_refunded + + + sales_order_item.gw_tax_amount_refunded + + + sales_order_item.event_id + + + sales_order_item.giftregistry_item_id + + + wishlist.name + + + wishlist.visibility + + + checkout_agreement.mode + + + cataloginventory_stock_item.deferred_stock_update + + + cataloginventory_stock_item.use_config_deferred_stock_update + + + quote.gw_base_price_incl_tax + + + quote.gw_price_incl_tax + + + quote.gw_items_base_price_incl_tax + + + quote.gw_items_price_incl_tax + + + quote.gw_card_base_price_incl_tax + + + quote.gw_card_price_incl_tax + + + quote_address.gw_base_price_incl_tax + + + quote_address.gw_price_incl_tax + + + quote_address.gw_items_base_price_incl_tax + + + quote_address.gw_items_price_incl_tax + + + quote_address.gw_card_base_price_incl_tax + + + quote_address.gw_card_price_incl_tax + + + sales_order.gw_base_price_incl_tax + + + sales_order.gw_price_incl_tax + + + sales_order.gw_items_base_price_incl_tax + + + sales_order.gw_items_price_incl_tax + + + sales_order.gw_card_base_price_incl_tax + + + sales_order.gw_card_price_incl_tax + + + catalog_category_entity.created_in + + + catalog_category_entity.updated_in + + + catalog_product_entity.created_in + + + catalog_product_entity.updated_in + + + catalogrule.created_in + + + catalogrule.updated_in + + + cms_block.created_in + + + cms_block.updated_in + + + cms_page.created_in + + + cms_page.updated_in + + + salesrule.created_in + + + salesrule.updated_in + + + catalog_category_entity.row_id + + + catalog_category_product.entity_id + + + catalog_product_entity.row_id + + + catalog_product_entity_media_gallery_value.row_id + + + catalogrule.row_id + + + cms_block.row_id + + + cms_page.row_id + + + salesrule.row_id + + + cms_page.meta_title + + + quote_payment.cc_exp_month + + + weee_tax.state + + + sendfriend_log.ip + + + rating_option_vote.remote_ip_long + + + oauth_consumer.callback_url + + + oauth_consumer.rejected_callback_url + + + oauth_token.callback_url + + + + diff --git a/etc/ee-to-ee/1.11.0.0/config.xml.dist b/etc/ee-to-ee/1.11.0.0/config.xml.dist index 9e5c6b89e..b6305eacc 100644 --- a/etc/ee-to-ee/1.11.0.0/config.xml.dist +++ b/etc/ee-to-ee/1.11.0.0/config.xml.dist @@ -96,6 +96,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.11.0.1/config.xml.dist b/etc/ee-to-ee/1.11.0.1/config.xml.dist index d746ee6e8..2f3b6b1fd 100644 --- a/etc/ee-to-ee/1.11.0.1/config.xml.dist +++ b/etc/ee-to-ee/1.11.0.1/config.xml.dist @@ -96,6 +96,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.11.0.2/config.xml.dist b/etc/ee-to-ee/1.11.0.2/config.xml.dist index 8111f8e6d..394cf6e0a 100644 --- a/etc/ee-to-ee/1.11.0.2/config.xml.dist +++ b/etc/ee-to-ee/1.11.0.2/config.xml.dist @@ -96,6 +96,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.11.1.0/config.xml.dist b/etc/ee-to-ee/1.11.1.0/config.xml.dist index 4869685b4..dee21bc59 100644 --- a/etc/ee-to-ee/1.11.1.0/config.xml.dist +++ b/etc/ee-to-ee/1.11.1.0/config.xml.dist @@ -96,6 +96,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.11.2.0/config.xml.dist b/etc/ee-to-ee/1.11.2.0/config.xml.dist index 499b59e01..1f79f1b09 100644 --- a/etc/ee-to-ee/1.11.2.0/config.xml.dist +++ b/etc/ee-to-ee/1.11.2.0/config.xml.dist @@ -96,6 +96,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.12.0.0/config.xml.dist b/etc/ee-to-ee/1.12.0.0/config.xml.dist index 9952f62e0..ce5e585c4 100644 --- a/etc/ee-to-ee/1.12.0.0/config.xml.dist +++ b/etc/ee-to-ee/1.12.0.0/config.xml.dist @@ -96,6 +96,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.12.0.1/config.xml.dist b/etc/ee-to-ee/1.12.0.1/config.xml.dist index 83c4c0ae1..309ec034f 100644 --- a/etc/ee-to-ee/1.12.0.1/config.xml.dist +++ b/etc/ee-to-ee/1.12.0.1/config.xml.dist @@ -96,6 +96,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.12.0.2/config.xml.dist b/etc/ee-to-ee/1.12.0.2/config.xml.dist index 24d233085..403aed820 100644 --- a/etc/ee-to-ee/1.12.0.2/config.xml.dist +++ b/etc/ee-to-ee/1.12.0.2/config.xml.dist @@ -96,6 +96,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.13.0.0/config.xml.dist b/etc/ee-to-ee/1.13.0.0/config.xml.dist index 23418e705..ee85a18e0 100644 --- a/etc/ee-to-ee/1.13.0.0/config.xml.dist +++ b/etc/ee-to-ee/1.13.0.0/config.xml.dist @@ -96,6 +96,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.13.0.1/config.xml.dist b/etc/ee-to-ee/1.13.0.1/config.xml.dist index a526fc2d9..0ad854229 100644 --- a/etc/ee-to-ee/1.13.0.1/config.xml.dist +++ b/etc/ee-to-ee/1.13.0.1/config.xml.dist @@ -96,6 +96,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.13.0.2/config.xml.dist b/etc/ee-to-ee/1.13.0.2/config.xml.dist index 73b692d2b..65c339b75 100644 --- a/etc/ee-to-ee/1.13.0.2/config.xml.dist +++ b/etc/ee-to-ee/1.13.0.2/config.xml.dist @@ -96,6 +96,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.13.1.0/config.xml.dist b/etc/ee-to-ee/1.13.1.0/config.xml.dist index 56575cf15..9d08719ce 100644 --- a/etc/ee-to-ee/1.13.1.0/config.xml.dist +++ b/etc/ee-to-ee/1.13.1.0/config.xml.dist @@ -96,6 +96,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.14.0.0/config.xml.dist b/etc/ee-to-ee/1.14.0.0/config.xml.dist index e5cb4d43d..8e20e8f3c 100644 --- a/etc/ee-to-ee/1.14.0.0/config.xml.dist +++ b/etc/ee-to-ee/1.14.0.0/config.xml.dist @@ -96,6 +96,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.14.0.1/config.xml.dist b/etc/ee-to-ee/1.14.0.1/config.xml.dist index 10c4b4bf8..f730ca6c2 100644 --- a/etc/ee-to-ee/1.14.0.1/config.xml.dist +++ b/etc/ee-to-ee/1.14.0.1/config.xml.dist @@ -96,6 +96,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.14.1.0/config.xml.dist b/etc/ee-to-ee/1.14.1.0/config.xml.dist index dab7ebff7..b6fcbf7bf 100644 --- a/etc/ee-to-ee/1.14.1.0/config.xml.dist +++ b/etc/ee-to-ee/1.14.1.0/config.xml.dist @@ -101,6 +101,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.14.2.0/config.xml.dist b/etc/ee-to-ee/1.14.2.0/config.xml.dist index 66404fd3c..2d3275ca0 100644 --- a/etc/ee-to-ee/1.14.2.0/config.xml.dist +++ b/etc/ee-to-ee/1.14.2.0/config.xml.dist @@ -101,6 +101,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.14.2.1/config.xml.dist b/etc/ee-to-ee/1.14.2.1/config.xml.dist index 6fb1e242c..e3b2adb01 100644 --- a/etc/ee-to-ee/1.14.2.1/config.xml.dist +++ b/etc/ee-to-ee/1.14.2.1/config.xml.dist @@ -101,6 +101,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.14.2.2/config.xml.dist b/etc/ee-to-ee/1.14.2.2/config.xml.dist index f8beae5ad..95ce7e449 100644 --- a/etc/ee-to-ee/1.14.2.2/config.xml.dist +++ b/etc/ee-to-ee/1.14.2.2/config.xml.dist @@ -101,6 +101,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.14.2.3/config.xml.dist b/etc/ee-to-ee/1.14.2.3/config.xml.dist index cd6dabd28..9ce9e14a2 100644 --- a/etc/ee-to-ee/1.14.2.3/config.xml.dist +++ b/etc/ee-to-ee/1.14.2.3/config.xml.dist @@ -101,6 +101,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.14.2.4/config.xml.dist b/etc/ee-to-ee/1.14.2.4/config.xml.dist index 355722859..cb255d4d4 100644 --- a/etc/ee-to-ee/1.14.2.4/config.xml.dist +++ b/etc/ee-to-ee/1.14.2.4/config.xml.dist @@ -101,6 +101,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.14.3.0/config.xml.dist b/etc/ee-to-ee/1.14.3.0/config.xml.dist index da28d78d2..00d4a783b 100644 --- a/etc/ee-to-ee/1.14.3.0/config.xml.dist +++ b/etc/ee-to-ee/1.14.3.0/config.xml.dist @@ -101,6 +101,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.14.3.1/config.xml.dist b/etc/ee-to-ee/1.14.3.1/config.xml.dist index 7118acd4b..57ebc048b 100644 --- a/etc/ee-to-ee/1.14.3.1/config.xml.dist +++ b/etc/ee-to-ee/1.14.3.1/config.xml.dist @@ -101,6 +101,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.14.3.2/config.xml.dist b/etc/ee-to-ee/1.14.3.2/config.xml.dist index 142c027fa..05276d393 100644 --- a/etc/ee-to-ee/1.14.3.2/config.xml.dist +++ b/etc/ee-to-ee/1.14.3.2/config.xml.dist @@ -101,6 +101,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.14.3.3/config.xml.dist b/etc/ee-to-ee/1.14.3.3/config.xml.dist index 87eac3264..a027734af 100644 --- a/etc/ee-to-ee/1.14.3.3/config.xml.dist +++ b/etc/ee-to-ee/1.14.3.3/config.xml.dist @@ -101,6 +101,7 @@ Migration\Step\Map\Delta + Migration\Step\Map\Volume Migration\Step\Log\Delta diff --git a/etc/ee-to-ee/1.14.3.4/config.xml.dist b/etc/ee-to-ee/1.14.3.4/config.xml.dist new file mode 100644 index 000000000..9eede7163 --- /dev/null +++ b/etc/ee-to-ee/1.14.3.4/config.xml.dist @@ -0,0 +1,173 @@ + + + + + + Migration\Step\Settings\Integrity + Migration\Step\Settings\Data + + + Migration\Step\Stores\Integrity + Migration\Step\Stores\Data + Migration\Step\Stores\Volume + + + + + Migration\Step\DataIntegrity\Integrity + + + Migration\Step\Eav\Integrity + Migration\Step\Eav\Data + Migration\Step\Eav\Volume + + + Migration\Step\CustomCustomerAttributes\Integrity + Migration\Step\CustomCustomerAttributes\Data + Migration\Step\CustomCustomerAttributes\Volume + + + Migration\Step\Customer\Integrity + Migration\Step\Customer\Data + Migration\Step\Customer\Volume + + + Migration\Step\Map\Integrity + Migration\Step\Map\Data + Migration\Step\Map\Volume + + + Migration\Step\UrlRewrite\Version11410to2000 + Migration\Step\UrlRewrite\Version11410to2000 + Migration\Step\UrlRewrite\Version11410to2000 + + + Migration\Step\Log\Integrity + Migration\Step\Log\Data + Migration\Step\Log\Volume + + + Migration\Step\Ratings\Integrity + Migration\Step\Ratings\Data + Migration\Step\Ratings\Volume + + + Migration\Step\SalesOrder\Integrity + Migration\Step\SalesOrder\Data + Migration\Step\SalesOrder\Volume + + + Migration\Step\ConfigurablePrices\Integrity + Migration\Step\ConfigurablePrices\Data + Migration\Step\ConfigurablePrices\Volume + + + Migration\Step\OrderGridsEE\Integrity + Migration\Step\OrderGridsEE\Data + Migration\Step\OrderGridsEE\Volume + + + Migration\Step\TierPrice\Integrity + Migration\Step\TierPrice\Data + Migration\Step\TierPrice\Volume + + + Migration\Step\SalesIncrement\Integrity + Migration\Step\SalesIncrement\Data + Migration\Step\SalesIncrement\Volume + + + Migration\Step\VisualMerchandiser\Integrity + Migration\Step\VisualMerchandiser\Data + Migration\Step\VisualMerchandiser\Volume + + + Migration\Step\PostProcessing\Data + + + + + Migration\Step\CustomCustomerAttributes\Delta + Migration\Step\CustomCustomerAttributes\Volume + + + Migration\Step\Customer\Delta + Migration\Step\Customer\Volume + + + Migration\Step\Map\Delta + Migration\Step\Map\Volume + + + Migration\Step\Log\Delta + Migration\Step\Log\Volume + + + Migration\Step\SalesOrder\Delta + Migration\Step\SalesOrder\Volume + + + Migration\Step\OrderGridsEE\Delta + Migration\Step\OrderGridsEE\Volume + + + Migration\Step\SalesIncrement\Delta + Migration\Step\SalesIncrement\Volume + + + + + + + + + + etc/ee-to-ee/1.14.3.4/map.xml.dist + etc/ee-to-ee/map-eav.xml.dist + etc/ee-to-ee/eav-document-groups.xml.dist + etc/ee-to-ee/eav-attribute-groups.xml.dist + etc/ee-to-ee/map-log.xml.dist + etc/ee-to-ee/log-document-groups.xml.dist + etc/ee-to-ee/settings.xml.dist + etc/ee-to-ee/map-customer.xml.dist + etc/ee-to-ee/customer-document-groups.xml.dist + etc/ee-to-ee/customer-attribute-groups.xml.dist + etc/ee-to-ee/map-sales.xml.dist + etc/ee-to-ee/deltalog.xml.dist + etc/ee-to-ee/customer-attr-map.xml.dist + etc/ee-to-ee/customer-attr-document-groups.xml.dist + etc/ee-to-ee/order-grids-document-groups.xml.dist + etc/ee-to-ee/class-map.xml.dist + etc/ee-to-ee/visual_merchandiser_map.xml.dist + etc/ee-to-ee/visual_merchandiser_document_groups.xml.dist + etc/ee-to-ee/visual_merchandiser_attribute_groups.xml.dist + etc/ee-to-ee/map-document-groups.xml.dist + etc/ee-to-ee/1.14.3.4/map-tier-price.xml.dist + + 0 + + 0 + + + 0 + migration.log + %percent%% [%bar%] Remaining Time: %remaining% + 1 + ee-to-ee + 1.14.3.4 + SET NAMES utf8; + SET NAMES utf8; + + + diff --git a/etc/ee-to-ee/1.14.3.4/map-tier-price.xml.dist b/etc/ee-to-ee/1.14.3.4/map-tier-price.xml.dist new file mode 100644 index 000000000..db03f1ff0 --- /dev/null +++ b/etc/ee-to-ee/1.14.3.4/map-tier-price.xml.dist @@ -0,0 +1,25 @@ + + + + + + + catalog_product_entity_group_price.is_percent + + + catalog_product_entity_tier_price.entity_id + catalog_product_entity_tier_price.row_id + + + catalog_product_entity_group_price.entity_id + catalog_product_entity_group_price.row_id + + + + + diff --git a/etc/ee-to-ee/1.14.3.4/map.xml.dist b/etc/ee-to-ee/1.14.3.4/map.xml.dist new file mode 100644 index 000000000..0f0f0768c --- /dev/null +++ b/etc/ee-to-ee/1.14.3.4/map.xml.dist @@ -0,0 +1,2566 @@ + + + + + + + googleshopping_attributes + + + googleshopping_items + + + googleshopping_types + + + enterprise_sales_creditmemo_grid_archive + + + enterprise_sales_invoice_grid_archive + + + enterprise_sales_order_grid_archive + + + enterprise_sales_shipment_grid_archive + + + sales_flat_creditmemo_grid + + + sales_flat_invoice_grid + + + sales_flat_order_grid + + + sales_flat_shipment_grid + + + customer_entity + + + customer_entity_datetime + + + customer_entity_decimal + + + customer_entity_int + + + customer_entity_text + + + customer_entity_varchar + + + customer_address_entity + + + customer_address_entity_datetime + + + customer_address_entity_decimal + + + customer_address_entity_int + + + customer_address_entity_text + + + customer_address_entity_varchar + + + m2_cl_* + + + url_rewrite_m2* + + + admin_assert + + + api2_acl_attribute + + + api2_acl_role + + + api2_acl_rule + + + api2_acl_user + + + api_assert + + + api_role + + + api_rule + + + api_session + + + api_user + + + log_customer + + + log_quote + + + log_summary_type + + + log_summary + + + log_url + + + log_url_info + + + catalog_category_anc_categs_index_idx + + + catalog_category_anc_categs_index_tmp + + + catalog_category_anc_products_index_idx + + + catalog_category_anc_products_index_tmp + + + catalog_category_flat_cl + + + catalog_category_product_index + + + catalog_category_product_index_cl + + + catalog_category_product_index_enbl_idx + + + catalog_category_product_index_enbl_tmp + + + catalog_category_product_index_idx + + + catalog_category_product_index_tmp + + + catalog_product_enabled_index + + + catalog_product_flat_cl + + + cataloginventory_stock_status + + + cataloginventory_stock_status_idx + + + cataloginventory_stock_status_tmp + + + catalog_category_product_cat_cl + + + catalog_product_bundle_price_index + + + catalog_product_bundle_stock_index + + + catalog_product_index_group_price + + + catalog_product_index_price + + + catalog_product_index_price* + + + catalog_product_index_tier_price + + + catalog_product_index_website + + + catalogindex_aggregation + + + catalogindex_aggregation_tag + + + catalogindex_aggregation_to_tag + + + catalogindex_minimal_price + + + catalogindex_price + + + core_layout_update + + + core_layout_link + + + widget_instance_page_layout + + + enterprise_queue_queue + + + enterprise_queue_task + + + find_feed_import_codes + + + googlebase_attributes + + + googlebase_items + + + googlebase_types + + + googlecheckout_api_debug + + + ogone_api_debug + + + oscommerce_import + + + oscommerce_import_type + + + oscommerce_orders + + + oscommerce_orders_products + + + oscommerce_orders_status_history + + + oscommerce_orders_total + + + oscommerce_ref + + + paygate_authorizenet_debug + + + paypal_api_debug + + + paypaluk_api_debug + + + amazonpayments_api_debug + + + chronopay_api_debug + + + cybermut_api_debug + + + cybersource_api_debug + + + eway_api_debug + + + flo2cash_api_debug + + + ideal_api_debug + + + paybox_api_debug + + + paybox_question_number + + + protx_api_debug + + + social_facebook_actions + + + strikeiron_tax_rate + + + xmlconnect_application + + + xmlconnect_config_data + + + xmlconnect_history + + + xmlconnect_images + + + xmlconnect_notification_template + + + xmlconnect_queue + + + googlecheckout_notification + + + index_event + + + index_process + + + index_process_event + + + cataloginventory_stock_status_cl + + + catalogsearch_fulltext + + + catalogsearch_fulltext_cl + + + core_cache_tag + + + core_cache_option + + + core_cache + + + core_flag + + + core_email_queue + + + core_email_queue_recipients + + + merchandiser_category_values + + + merchandiser_vmbuild + + + dataflow_batch + + + dataflow_batch_export + + + dataflow_batch_import + + + dataflow_import_data + + + dataflow_profile + + + dataflow_profile_history + + + dataflow_session + + + core_url_rewrite + + + catalog_product_entity_url_key + + + catalogindex_eav + + + catalog_eav_attribute + + + customer_eav_attribute + + + catalog_product_index_eav + + + catalog_product_index_eav_decimal + + + catalog_product_index_eav_decimal_idx + + + catalog_product_index_eav_decimal_tmp + + + catalog_product_index_eav_idx + + + catalog_product_index_eav_tmp + + + eav_attribute + + + eav_attribute_group + + + eav_attribute_set + + + eav_entity_attribute + + + eav_entity_type + + + catalog_category_entity_url_key + + + poll + + + poll_answer + + + poll_store + + + poll_vote + + + sales_recurring_profile + + + sales_recurring_profile_order + + + tag + + + tag_properties + + + tag_relation + + + tag_summary + + + weee_discount + + + catalogsearch_result + + + log_visitor + + + log_visitor_info + + + log_visitor_online + + + core_config_data + + + s_*b_*_* + + + catalog_product_flat_* + + + catalog_category_flat_* + + + catalog_category_flat_store_* + + + googleoptimizer_code + + + core_resource + + + cron_schedule + + + admin_user + + + enterprise_admin_passwords + + + admin_role + + + admin_rule + + + sales_flat_order + + + admin_role + + + admin_rule + + + enterprise_url_rewrite + + + enterprise_url_rewrite_category_cl + + + enterprise_url_rewrite_product_cl + + + enterprise_url_rewrite_redirect + + + enterprise_url_rewrite_redirect_cl + + + enterprise_url_rewrite_redirect_rewrite + + + enterprise_catalog_category_rewrite + + + enterprise_catalog_product_rewrite + + + enterprise_catalogpermissions_index + + + enterprise_catalogpermissions_index_product + + + enterprise_rma_item_eav_attribute + + + enterprise_rma_item_eav_attribute_website + + + enterprise_customer_sales_flat_order + + + enterprise_customer_sales_flat_order_address + + + enterprise_customer_sales_flat_quote + + + enterprise_customer_sales_flat_quote_address + + + enterprise_targetrule_index + + + enterprise_targetrule_index_crosssell + + + enterprise_targetrule_index_crosssell_product + + + enterprise_targetrule_index_related + + + enterprise_targetrule_index_related_product + + + enterprise_targetrule_index_upsell + + + enterprise_targetrule_index_upsell_product + + + enterprise_staging + + + enterprise_staging_action + + + enterprise_staging_item + + + enterprise_staging_log + + + core_session + + + enterprise_staging_product_unlinked + + + enterprise_support_backup + + + enterprise_support_backup_item + + + enterprise_support_sysreport + + + enterprise_mview_event + + + enterprise_mview_metadata + + + enterprise_mview_metadata_event + + + enterprise_mview_metadata_group + + + enterprise_mview_subscriber + + + enterprise_index_multiplier + + + catalogrule_affected_product + + + catalog_product_super_attribute_pricing + + + core_website + + + catalog_product_entity_group_price + + + catalog_product_entity_tier_price + + + permission_block + + + permission_variable + + + enterprise_cms_page_revision + + + enterprise_cms_page_version + + + customer_flowpassword + + + catalogsearch_query + search_query + + + core_variable + variable + + + core_variable_value + variable_value + + + core_email_template + email_template + + + core_store + store + + + core_store_group + store_group + + + core_translate + translation + + + core_session + session + + + coupon_aggregated + salesrule_coupon_aggregated + + + coupon_aggregated_order + salesrule_coupon_aggregated_order + + + coupon_aggregated_updated + salesrule_coupon_aggregated_updated + + + sales_flat_creditmemo + sales_creditmemo + + + sales_flat_creditmemo_comment + sales_creditmemo_comment + + + sales_flat_creditmemo_item + sales_creditmemo_item + + + sales_flat_invoice + sales_invoice + + + sales_flat_invoice_comment + sales_invoice_comment + + + sales_flat_invoice_item + sales_invoice_item + + + sales_flat_order_address + sales_order_address + + + sales_flat_order_item + sales_order_item + + + sales_flat_order_payment + sales_order_payment + + + sales_flat_order_status_history + sales_order_status_history + + + sales_flat_quote + quote + + + sales_flat_quote_address + quote_address + + + sales_flat_quote_address_item + quote_address_item + + + sales_flat_quote_item + quote_item + + + sales_flat_quote_item_option + quote_item_option + + + sales_flat_quote_payment + quote_payment + + + sales_flat_quote_shipping_rate + quote_shipping_rate + + + sales_flat_shipment + sales_shipment + + + sales_flat_shipment_comment + sales_shipment_comment + + + sales_flat_shipment_item + sales_shipment_item + + + sales_flat_shipment_track + sales_shipment_track + + + sales_billing_agreement + paypal_billing_agreement + + + sales_billing_agreement_order + paypal_billing_agreement_order + + + enterprise_rma + magento_rma + + + enterprise_rma_item_entity + magento_rma_item_entity + + + enterprise_rma_item_entity_datetime + magento_rma_item_entity_datetime + + + enterprise_rma_item_entity_decimal + magento_rma_item_entity_decimal + + + enterprise_rma_item_entity_int + magento_rma_item_entity_int + + + enterprise_rma_item_entity_text + magento_rma_item_entity_text + + + enterprise_rma_item_entity_varchar + magento_rma_item_entity_varchar + + + enterprise_rma_item_form_attribute + magento_rma_item_form_attribute + + + enterprise_rma_shipping_label + magento_rma_shipping_label + + + enterprise_rma_status_history + magento_rma_status_history + + + enterprise_banner + magento_banner + + + enterprise_banner_catalogrule + magento_banner_catalogrule + + + enterprise_banner_content + magento_banner_content + + + enterprise_banner_customersegment + magento_banner_customersegment + + + enterprise_banner_salesrule + magento_banner_salesrule + + + enterprise_catalogevent_event + magento_catalogevent_event + + + enterprise_catalogevent_event_image + magento_catalogevent_event_image + + + enterprise_catalogpermissions + magento_catalogpermissions + + + enterprise_cms_hierarchy_lock + magento_versionscms_hierarchy_lock + + + enterprise_cms_hierarchy_metadata + magento_versionscms_hierarchy_metadata + + + enterprise_cms_hierarchy_node + magento_versionscms_hierarchy_node + + + enterprise_cms_increment + magento_versionscms_increment + + + enterprise_customerbalance + magento_customerbalance + + + enterprise_customerbalance_history + magento_customerbalance_history + + + enterprise_customersegment_customer + magento_customersegment_customer + + + enterprise_customersegment_event + magento_customersegment_event + + + enterprise_customersegment_segment + magento_customersegment_segment + + + enterprise_customersegment_website + magento_customersegment_website + + + enterprise_giftcard_amount + magento_giftcard_amount + + + enterprise_giftcardaccount + magento_giftcardaccount + + + enterprise_giftcardaccount_history + magento_giftcardaccount_history + + + enterprise_giftcardaccount_pool + magento_giftcardaccount_pool + + + enterprise_giftregistry_data + magento_giftregistry_data + + + enterprise_giftregistry_entity + magento_giftregistry_entity + + + enterprise_giftregistry_item + magento_giftregistry_item + + + enterprise_giftregistry_item_option + magento_giftregistry_item_option + + + enterprise_giftregistry_label + magento_giftregistry_label + + + enterprise_giftregistry_person + magento_giftregistry_person + + + enterprise_giftregistry_type + magento_giftregistry_type + + + enterprise_giftregistry_type_info + magento_giftregistry_type_info + + + enterprise_giftwrapping + magento_giftwrapping + + + enterprise_giftwrapping_store_attributes + magento_giftwrapping_store_attributes + + + enterprise_giftwrapping_website + magento_giftwrapping_website + + + enterprise_invitation + magento_invitation + + + enterprise_invitation_status_history + magento_invitation_status_history + + + enterprise_invitation_track + magento_invitation_track + + + enterprise_logging_event + magento_logging_event + + + enterprise_logging_event_changes + magento_logging_event_changes + + + enterprise_reminder_rule + magento_reminder_rule + + + enterprise_reminder_rule_coupon + magento_reminder_rule_coupon + + + enterprise_reminder_rule_log + magento_reminder_rule_log + + + enterprise_reminder_rule_website + magento_reminder_rule_website + + + enterprise_reminder_template + magento_reminder_template + + + enterprise_reward + magento_reward + + + enterprise_reward_history + magento_reward_history + + + enterprise_reward_rate + magento_reward_rate + + + enterprise_reward_salesrule + magento_reward_salesrule + + + enterprise_scheduled_operations + magento_scheduled_operations + + + enterprise_targetrule + magento_targetrule + + + enterprise_targetrule_customersegment + magento_targetrule_customersegment + + + enterprise_targetrule_product + magento_targetrule_product + + + core_directory_storage + media_storage_directory_storage + + + core_file_storage + media_storage_file_storage + + + enterprise_rma_grid + magento_rma_grid + + + enterprise_support_backup + support_backup + + + enterprise_support_backup_item + support_backup_item + + + + + cms_page.root_template + cms_page.page_layout + + + sales_flat_creditmemo.hidden_tax_amount + sales_creditmemo.discount_tax_compensation_amount + + + sales_flat_creditmemo.base_hidden_tax_amount + sales_creditmemo.base_discount_tax_compensation_amount + + + sales_flat_creditmemo.shipping_hidden_tax_amount + sales_creditmemo.shipping_discount_tax_compensation_amount + + + sales_flat_creditmemo.base_shipping_hidden_tax_amnt + sales_creditmemo.base_shipping_discount_tax_compensation_amnt + + + sales_flat_creditmemo_item.hidden_tax_amount + sales_creditmemo_item.discount_tax_compensation_amount + + + sales_flat_creditmemo_item.base_hidden_tax_amount + sales_creditmemo_item.base_discount_tax_compensation_amount + + + sales_flat_invoice.hidden_tax_amount + sales_invoice.discount_tax_compensation_amount + + + sales_flat_invoice.base_hidden_tax_amount + sales_invoice.base_discount_tax_compensation_amount + + + sales_flat_invoice.shipping_hidden_tax_amount + sales_invoice.shipping_discount_tax_compensation_amount + + + sales_flat_invoice.base_shipping_hidden_tax_amnt + sales_invoice.base_shipping_discount_tax_compensation_amnt + + + sales_flat_invoice_item.hidden_tax_amount + sales_invoice_item.discount_tax_compensation_amount + + + sales_flat_invoice_item.base_hidden_tax_amount + sales_invoice_item.base_discount_tax_compensation_amount + + + sales_flat_order_item.hidden_tax_amount + sales_order_item.discount_tax_compensation_amount + + + sales_flat_order_item.base_hidden_tax_amount + sales_order_item.base_discount_tax_compensation_amount + + + sales_flat_order_item.hidden_tax_invoiced + sales_order_item.discount_tax_compensation_invoiced + + + sales_flat_order_item.base_hidden_tax_invoiced + sales_order_item.base_discount_tax_compensation_invoiced + + + sales_flat_order_item.hidden_tax_refunded + sales_order_item.discount_tax_compensation_refunded + + + sales_flat_order_item.base_hidden_tax_refunded + sales_order_item.base_discount_tax_compensation_refunded + + + sales_flat_order_item.hidden_tax_canceled + sales_order_item.discount_tax_compensation_canceled + + + sales_flat_order_payment.cc_last4 + sales_order_payment.cc_last_4 + + + sales_flat_quote_payment.cc_last4 + quote_payment.cc_last_4 + + + sales_flat_quote_address.hidden_tax_amount + quote_address.discount_tax_compensation_amount + + + sales_flat_quote_address.base_hidden_tax_amount + quote_address.base_discount_tax_compensation_amount + + + sales_flat_quote_address.shipping_hidden_tax_amount + quote_address.shipping_discount_tax_compensation_amount + + + sales_flat_quote_address.base_shipping_hidden_tax_amnt + quote_address.base_shipping_discount_tax_compensation_amnt + + + sales_flat_quote_address_item.hidden_tax_amount + quote_address_item.discount_tax_compensation_amount + + + sales_flat_quote_address_item.base_hidden_tax_amount + quote_address_item.base_discount_tax_compensation_amount + + + sales_flat_quote_item.hidden_tax_amount + quote_item.discount_tax_compensation_amount + + + sales_flat_quote_item.base_hidden_tax_amount + quote_item.base_discount_tax_compensation_amount + + + catalog_category_entity_datetime.entity_id + catalog_category_entity_datetime.row_id + + + catalog_category_entity_decimal.entity_id + catalog_category_entity_decimal.row_id + + + catalog_category_entity_int.entity_id + catalog_category_entity_int.row_id + + + catalog_category_entity_text.entity_id + catalog_category_entity_text.row_id + + + catalog_category_entity_varchar.entity_id + catalog_category_entity_varchar.row_id + + + catalog_product_entity_datetime.entity_id + catalog_product_entity_datetime.row_id + + + catalog_product_entity_decimal.entity_id + catalog_product_entity_decimal.row_id + + + catalog_product_entity_gallery.entity_id + catalog_product_entity_gallery.row_id + + + catalog_product_entity_int.entity_id + catalog_product_entity_int.row_id + + + catalog_product_entity_text.entity_id + catalog_product_entity_text.row_id + + + catalog_product_entity_varchar.entity_id + catalog_product_entity_varchar.row_id + + + catalogrule_customer_group.rule_id + catalogrule_customer_group.row_id + + + catalogrule_website.rule_id + catalogrule_website.row_id + + + salesrule_customer_group.rule_id + salesrule_customer_group.row_id + + + salesrule_product_attribute.rule_id + salesrule_product_attribute.row_id + + + salesrule_website.rule_id + salesrule_website.row_id + + + cms_block_store.block_id + cms_block_store.row_id + + + cms_page_store.page_id + cms_page_store.row_id + + + catalog_product_entity_tier_price.entity_id + catalog_product_entity_tier_price.row_id + + + enterprise_giftcard_amount.entity_id + magento_giftcard_amount.row_id + + + catalog_category_entity_varchar.value + + + + + + + catalog_category_entity_varchar.value + + + + + + + catalog_category_entity_text.value + + + + + + + catalog_product_entity_varchar.value + + + + + + + cms_page.root_template + + + + + + + cms_block.content + + + + cms_page.content + + + + newsletter_template.template_text + + + + core_email_template.template_text + + + + widget_instance.instance_type + + + + catalogrule.conditions_serialized + + + + catalogrule.actions_serialized + + + + salesrule.conditions_serialized + + + + salesrule.actions_serialized + + + + enterprise_targetrule.conditions_serialized + + + + enterprise_targetrule.actions_serialized + + + + enterprise_reminder_rule.conditions_serialized + + + + enterprise_reminder_rule.condition_sql + + + + enterprise_customersegment_segment.conditions_serialized + + + + enterprise_customersegment_segment.condition_sql + + + + + + sales_flat_order_item.weee_tax_applied + + + + sales_flat_quote_item.weee_tax_applied + + + + sales_flat_creditmemo_item.weee_tax_applied + + + + sales_flat_invoice_item.weee_tax_applied + + + + enterprise_logging_event.ip + + + + enterprise_logging_event.x_forwarded_ip + + + + rating_option_vote.remote_ip_long + + + + sendfriend_log.ip + + + + catalog_product_entity_media_gallery.value_id + + + + enterprise_giftregistry_type.meta_xml + + + + catalogrule.rule_id + + + + + + salesrule.rule_id + + + + + + catalog_category_entity.entity_id + + + + + + catalog_product_entity.entity_id + + + + + + cms_block.block_id + + + + + + cms_page.page_id + + + + + + catalogsearch_query.synonym_for + + + + admin_rule.role_type + + + admin_rule.assert_id + + + core_website.is_staging + + + core_website.master_login + + + core_website.master_password + + + core_website.visibility + + + sales_order_tax.hidden + + + sales_flat_order.reward_points_balance_refunded + + + sales_flat_order.reward_salesrule_points + + + sales_flat_order_item.is_nominal + + + sales_flat_order_payment.paybox_request_number + + + weee_tax.entity_type_id + + + catalog_category_entity.entity_type_id + + + catalog_category_entity_datetime.entity_type_id + + + catalog_category_entity_decimal.entity_type_id + + + catalog_category_entity_int.entity_type_id + + + catalog_category_entity_text.entity_type_id + + + catalog_category_entity_varchar.entity_type_id + + + catalog_product_entity.entity_type_id + + + catalog_product_entity_datetime.entity_type_id + + + catalog_product_entity_decimal.entity_type_id + + + catalog_product_entity_gallery.entity_type_id + + + catalog_product_entity_media_gallery.entity_id + + + catalog_product_entity_int.entity_type_id + + + catalog_product_entity_text.entity_type_id + + + catalog_product_entity_varchar.entity_type_id + + + sales_flat_creditmemo.cybersource_token + + + sales_flat_invoice.cybersource_token + + + sales_flat_order_payment.ideal_transaction_checked + + + sales_flat_order_payment.cybersource_token + + + sales_flat_order_payment.ideal_issuer_title + + + sales_flat_order_payment.paybox_question_number + + + sales_flat_order_payment.ideal_issuer_id + + + sales_flat_order_payment.flo2cash_account_id + + + sales_flat_quote_payment.cybersource_token + + + sales_flat_quote_payment.ideal_issuer_id + + + sales_flat_quote_payment.ideal_issuer_list + + + sales_flat_quote_payment.paypal_payer_id + + + sales_flat_quote_payment.paypal_payer_status + + + sales_flat_quote_payment.paypal_correlation_id + + + cms_page.layout_update_xml + + + cms_page.custom_layout_update_xml + + + widget_instance.package_theme + + + enterprise_rma_item_entity.entity_type_id + + + enterprise_rma_item_entity.attribute_set_id + + + enterprise_rma_item_entity_datetime.entity_type_id + + + enterprise_rma_item_entity_decimal.entity_type_id + + + enterprise_rma_item_entity_int.entity_type_id + + + enterprise_rma_item_entity_text.entity_type_id + + + enterprise_rma_item_entity_varchar.entity_type_id + + + enterprise_giftcard_amount.entity_type_id + + + enterprise_targetrule.use_customer_segment + + + enterprise_targetrule_product.store_id + + + newsletter_template.template_text_preprocessed + + + enterprise_giftregistry_person.middlename + + + sales_flat_quote.base_customer_balance_virtual_amount + + + catalogsearch_query.synonym_for + + + catalogrule.sub_is_enable + + + catalogrule.sub_simple_action + + + catalogrule.sub_discount_amount + + + catalogrule_product.sub_simple_action + + + catalogrule_product.sub_discount_amount + + + cms_page.published_revision_id + + + cms_page.under_version_control + + + sales_flat_invoice.customer_id + + + sales_flat_invoice.invoice_status_id + + + sales_flat_invoice.invoice_type + + + sales_flat_invoice.is_virtual + + + sales_flat_invoice.real_order_id + + + sales_flat_invoice.total_due + + + sales_flat_invoice.total_paid + + + sales_flat_invoice_item.shipment_id + + + sales_flat_order.base_custbalance_amount + + + sales_flat_order.currency_base_id + + + sales_flat_order.currency_code + + + sales_flat_order.currency_rate + + + sales_flat_order.custbalance_amount + + + sales_flat_order.is_hold + + + sales_flat_order.is_multi_payment + + + sales_flat_order.real_order_id + + + sales_flat_order.tax_percent + + + sales_flat_order.tracking_numbers + + + sales_flat_order_address.address_id + + + sales_flat_order_address.gift_message_id + + + sales_flat_order_address.tax_id + + + sales_flat_order_payment.amount + + + sales_flat_order_payment.cc_raw_request + + + sales_flat_order_payment.cc_raw_response + + + sales_flat_order_payment.customer_payment_id + + + sales_bestsellers_aggregated_daily.product_type_id + + + sales_bestsellers_aggregated_monthly.product_type_id + + + sales_bestsellers_aggregated_yearly.product_type_id + + + sales_flat_quote_payment.cc_exp_month + + + weee_tax.state + + + enterprise_banner.is_ga_enabled + + + enterprise_logging_event.ip + + + enterprise_logging_event.x_forwarded_ip + + + rating_option_vote.remote_ip_long + + + sendfriend_log.ip + + + enterprise_catalogevent_event.date_start + + + enterprise_catalogevent_event.date_end + + + oauth_token.callback_url + + + oauth_consumer.callback_url + + + oauth_consumer.rejected_callback_url + + + enterprise_reminder_rule.from_date + + + enterprise_reminder_rule.to_date + + + + + + + ui_bookmark + + + migration_backup_* + + + googleoptimizer_code + + + indexer_state + + + integration + + + mview_state + + + theme + + + theme_file + + + vde_theme_change + + + admin_system_messages + + + catalog_url_rewrite_product_category + + + customer_visitor + + + url_rewrite + + + layout_update + + + layout_link + + + catalog_product_flat_* + + + catalog_category_flat_* + + + catalogindex_eav + + + catalog_eav_attribute + + + catalogsearch_fulltext_index_default + + + customer_eav_attribute + + + customer_eav_attribute_website + + + catalog_product_index_eav + + + catalog_product_index_eav_decimal + + + catalog_product_index_eav_decimal_idx + + + catalog_product_index_eav_decimal_tmp + + + catalog_product_index_eav_idx + + + catalog_product_index_eav_tmp + + + catalog_category_product_index_tmp + + + eav_attribute + + + eav_attribute_group + + + eav_attribute_set + + + eav_entity_attribute + + + eav_entity_type + + + authorization_role + + + authorization_rule + + + setup_module + + + sales_order + + + cache + + + cache_tag + + + customer_log + + + flag + + + log_customer + + + log_quote + + + log_summary_type + + + log_summary + + + log_url + + + log_url_info + + + quote_id_mask + + + session + + + sales_sequence_profile + + + sales_sequence_meta + + + sequence_invoice_* + + + sequence_creditmemo_* + + + sequence_order_* + + + sequence_shipment* + + + sequence_rma_item_* + + + magento_rma_item_eav_attribute + + + magento_rma_item_eav_attribute_website + + + magento_catalogpermissions_index + + + magento_catalogpermissions_index_product + + + magento_catalogpermissions_index_product_tmp + + + magento_catalogpermissions_index_tmp + + + magento_customercustomattributes_sales_flat_order + + + magento_customercustomattributes_sales_flat_order_address + + + magento_customercustomattributes_sales_flat_quote + + + magento_customercustomattributes_sales_flat_quote_address + + + magento_targetrule_index + + + magento_targetrule_index_crosssell + + + magento_targetrule_index_crosssell_product + + + magento_targetrule_index_related + + + magento_targetrule_index_related_product + + + magento_targetrule_index_upsell + + + magento_targetrule_index_upsell_product + + + quote_id_mask + + + eav_attribute_option_swatch + + + import_history + + + magento_sales_creditmemo_grid_archive + + + magento_sales_invoice_grid_archive + + + magento_sales_order_grid_archive + + + magento_sales_shipment_grid_archive + + + sales_creditmemo_grid + + + sales_invoice_grid + + + sales_order_grid + + + sales_shipment_grid + + + catalogsearch_fulltext_scope* + + + customer_entity + + + customer_entity_datetime + + + customer_entity_decimal + + + customer_entity_int + + + customer_entity_text + + + customer_entity_varchar + + + customer_address_entity + + + customer_address_entity_datetime + + + customer_address_entity_decimal + + + customer_address_entity_int + + + customer_address_entity_text + + + customer_address_entity_varchar + + + store_website + + + support_report + + + log_visitor_info + + + log_visitor_online + + + reporting_module_status + + + reporting_orders + + + reporting_system_updates + + + reporting_users + + + reporting_counts + + + queue + + + queue_message + + + queue_message_status + + + catalog_product_entity_media_gallery_value_to_entity + + + catalog_product_entity_media_gallery_value_video + + + catalog_product_entity_tier_price + + + customer_grid_flat + + + visual_merchandiser_rule + + + admin_passwords + + + oauth_token_request_log + + + design_config_grid_flat + + + admin_user_session + + + magento_salesrule_filter + + + multiinventory_warehouse + + + password_reset_request_event + + + queue_lock + + + quote_preview + + + search_synonyms + + + sequence_catalog_category + + + sequence_catalogrule + + + sequence_cms_block + + + sequence_cms_page + + + sequence_product + + + sequence_salesrule + + + staging_update + + + vault_payment_token + + + vault_payment_token_order_payment_link + + + + + admin_user.interface_locale + + + + + + cataloginventory_stock.website_id + + + + + + cataloginventory_stock_item.website_id + + + + + + rating.is_active + + + + + + authorization_role.user_type + + + + + + sales_order_tax_item.amount + + + + + + sales_order_tax_item.base_amount + + + + + + sales_order_tax_item.real_amount + + + + + + sales_order_tax_item.real_base_amount + + + + + + sales_order_tax_item.taxable_item_type + + + + + + oauth_token.user_type + + + + + + widget_instance.theme_id + + + + + + sales_order_status_state.visible_on_front + + + + magento_banner_content.banner_content + + + + catalog_product_entity_media_gallery_value.entity_id + + + + catalog_category_entity.row_id + + + + + + catalog_product_entity.row_id + + + + + + catalogrule.row_id + + + + + + cms_block.row_id + + + + + + cms_page.row_id + + + + + + salesrule.row_id + + + + + + magento_catalogevent_event.status + + + + catalog_product_entity_media_gallery_value.entity_id + + + catalog_product_entity_media_gallery.media_type + + + catalog_product_entity_media_gallery.disabled + + + catalog_product_entity_media_gallery_value.record_id + + + admin_user.interface_locale + + + rating.is_active + + + sales_creditmemo.send_email + + + sales_creditmemo.customer_note + + + sales_creditmemo.customer_note_notify + + + sales_invoice.send_email + + + sales_invoice.customer_note + + + sales_invoice.customer_note_notify + + + sales_shipment.send_email + + + sales_shipment.customer_note + + + sales_shipment.customer_note_notify + + + sales_creditmemo_item.tax_ratio + + + sales_invoice_item.tax_ratio + + + authorization_role.user_type + + + cataloginventory_stock.website_id + + + cataloginventory_stock_item.website_id + + + oauth_nonce.consumer_id + + + oauth_token.user_type + + + sales_order_status_state.visible_on_front + + + widget_instance.theme_id + + + sales_order_tax_item.amount + + + sales_order_tax_item.base_amount + + + sales_order_tax_item.real_amount + + + sales_order_tax_item.real_base_amount + + + sales_order_tax_item.associated_item_id + + + sales_order_tax_item.taxable_item_type + + + magento_banner.is_ga_enabled + + + magento_banner.ga_creative + + + checkout_agreement.mode + + + cataloginventory_stock_item.deferred_stock_update + + + cataloginventory_stock_item.use_config_deferred_stock_update + + + quote.gw_base_price_incl_tax + + + quote.gw_price_incl_tax + + + quote.gw_items_base_price_incl_tax + + + quote.gw_items_price_incl_tax + + + quote.gw_card_base_price_incl_tax + + + quote.gw_card_price_incl_tax + + + quote_address.gw_base_price_incl_tax + + + quote_address.gw_price_incl_tax + + + quote_address.gw_items_base_price_incl_tax + + + quote_address.gw_items_price_incl_tax + + + quote_address.gw_card_base_price_incl_tax + + + quote_address.gw_card_price_incl_tax + + + catalog_category_entity.created_in + + + catalog_category_entity.updated_in + + + catalog_product_entity.created_in + + + catalog_product_entity.updated_in + + + catalogrule.created_in + + + catalogrule.updated_in + + + cms_block.created_in + + + cms_block.updated_in + + + cms_page.created_in + + + cms_page.updated_in + + + salesrule.created_in + + + salesrule.updated_in + + + catalog_category_entity.row_id + + + catalog_category_product.entity_id + + + catalog_product_entity.row_id + + + catalog_product_entity_media_gallery_value.row_id + + + catalogrule.row_id + + + cms_block.row_id + + + cms_page.row_id + + + salesrule.row_id + + + cms_page.meta_title + + + magento_catalogevent_event.status + + + quote_payment.cc_exp_month + + + weee_tax.state + + + magento_logging_event.ip + + + magento_logging_event.x_forwarded_ip + + + rating_option_vote.remote_ip_long + + + sendfriend_log.ip + + + magento_catalogevent_event.date_start + + + magento_catalogevent_event.date_end + + + oauth_consumer.callback_url + + + oauth_consumer.rejected_callback_url + + + oauth_token.callback_url + + + magento_reminder_rule.from_date + + + magento_reminder_rule.to_date + + + + diff --git a/src/Migration/App/SetupDeltaLog.php b/src/Migration/App/SetupDeltaLog.php index deab4f6de..ad4f77aab 100644 --- a/src/Migration/App/SetupDeltaLog.php +++ b/src/Migration/App/SetupDeltaLog.php @@ -8,6 +8,7 @@ use Migration\Reader\Groups; use Migration\App\Step\StageInterface; use Migration\ResourceModel\Source; +use Migration\Logger\Logger; class SetupDeltaLog implements StageInterface { @@ -31,19 +32,27 @@ class SetupDeltaLog implements StageInterface */ private $groupsFactory; + /** + * @var Logger + */ + private $logger; + /** * @param Source $source * @param \Migration\Reader\GroupsFactory $groupsFactory * @param ProgressBar\LogLevelProcessor $progress + * @param Logger $logger */ public function __construct( Source $source, \Migration\Reader\GroupsFactory $groupsFactory, - ProgressBar\LogLevelProcessor $progress + ProgressBar\LogLevelProcessor $progress, + Logger $logger ) { $this->source = $source; $this->groupsFactory = $groupsFactory; $this->progress = $progress; + $this->logger = $logger; } /** @@ -51,17 +60,29 @@ public function __construct( */ public function perform() { + $countDeltaDocuments = 0; + $countDeltaDocumentsCreated = 0; $deltaLogs = $this->getGroupsReader()->getGroups(); $this->progress->start(count($deltaLogs, 1) - count($deltaLogs)); foreach ($deltaLogs as $deltaDocuments) { foreach ($deltaDocuments as $documentName => $idKey) { $this->progress->advance(); + $countDeltaDocuments++; if ($this->source->getDocument($documentName)) { - $this->source->createDelta($documentName, $idKey); + $countDeltaDocumentsCreated += (int) $this->source->createDelta($documentName, $idKey); } } } $this->progress->finish(); + if ($countDeltaDocuments != $countDeltaDocumentsCreated) { + $this->logger->warning( + sprintf( + 'Some of the delta log tables were not created. Expected:%s. Actual:%s', + $countDeltaDocuments, + $countDeltaDocumentsCreated + ) + ); + } return true; } diff --git a/src/Migration/ResourceModel/Adapter/Mysql.php b/src/Migration/ResourceModel/Adapter/Mysql.php index cb4ef7d39..6bbf0bbf1 100644 --- a/src/Migration/ResourceModel/Adapter/Mysql.php +++ b/src/Migration/ResourceModel/Adapter/Mysql.php @@ -360,10 +360,11 @@ public function deleteBackup($documentName) * @param string $documentName * @param string $deltaLogName * @param string $idKey - * @return void + * @return boolean */ public function createDelta($documentName, $deltaLogName, $idKey) { + $deltaCreated = true; if (!$this->resourceAdapter->isTableExists($deltaLogName)) { $triggerTable = $this->resourceAdapter->newTable($deltaLogName) ->addColumn( @@ -381,6 +382,7 @@ public function createDelta($documentName, $deltaLogName, $idKey) ['nullable' => false, 'default' => 0] ); $this->resourceAdapter->createTable($triggerTable); + $deltaCreated = $this->resourceAdapter->isTableExists($deltaLogName); } else { $this->deleteAllRecords($deltaLogName); } @@ -412,6 +414,7 @@ public function createDelta($documentName, $deltaLogName, $idKey) } unset($trigger); } + return $deltaCreated; } /** diff --git a/src/Migration/ResourceModel/AdapterInterface.php b/src/Migration/ResourceModel/AdapterInterface.php index eeda07b44..ed5ad14dc 100644 --- a/src/Migration/ResourceModel/AdapterInterface.php +++ b/src/Migration/ResourceModel/AdapterInterface.php @@ -147,7 +147,7 @@ public function deleteBackup($documentName); * @param string $documentName * @param string $deltaLogName * @param string $idKey - * @return void + * @return boolean */ public function createDelta($documentName, $deltaLogName, $idKey); diff --git a/src/Migration/ResourceModel/Record.php b/src/Migration/ResourceModel/Record.php index 5b7ac7846..d6402fe49 100644 --- a/src/Migration/ResourceModel/Record.php +++ b/src/Migration/ResourceModel/Record.php @@ -104,6 +104,25 @@ public function getValue($columnName) return isset($this->data[$columnName]) ? $this->data[$columnName] : null; } + /** + * Get column default value + * + * @param string $columnName + * @return mixed + * @throws Exception + */ + public function getValueDefault($columnName) + { + if ($this->structure && !$this->structure->hasField($columnName)) { + throw new Exception("Record structure does not contain field $columnName"); + } + $fields = $this->structure->getFields(); + if ($fields[$columnName]['DEFAULT'] === null && $fields[$columnName]['NULLABLE'] === false) { + return ''; + } + return $fields[$columnName]['DEFAULT']; + } + /** * Set column value * @@ -147,6 +166,24 @@ public function getData() return $this->data; } + /** + * Get record default data + * + * @return array + */ + public function getDataDefault() + { + $fields = []; + foreach ($this->structure->getFields() as $code => $structure) { + if ($structure['DEFAULT'] === null && $structure['NULLABLE'] === false) { + $fields[$code] = ''; + } else { + $fields[$code] = $structure['DEFAULT']; + } + } + return $fields; + } + /** * @return array * @throws Exception diff --git a/src/Migration/ResourceModel/Source.php b/src/Migration/ResourceModel/Source.php index eb41742f1..3767e38d9 100644 --- a/src/Migration/ResourceModel/Source.php +++ b/src/Migration/ResourceModel/Source.php @@ -125,15 +125,16 @@ protected function getIdentityField($documentName) * * @param string $documentName * @param string $idKey - * @return void + * @return boolean */ public function createDelta($documentName, $idKey) { - $this->getAdapter()->createDelta( + $result = $this->getAdapter()->createDelta( $this->addDocumentPrefix($documentName), $this->addDocumentPrefix($this->getDeltaLogName($documentName)), $idKey ); + return $result; } /** diff --git a/src/Migration/Step/Customer/Helper.php b/src/Migration/Step/Customer/Helper.php index bca4846ea..3b84a81ee 100644 --- a/src/Migration/Step/Customer/Helper.php +++ b/src/Migration/Step/Customer/Helper.php @@ -252,6 +252,7 @@ public function updateAttributeData( */ protected function getFieldsWithDefaultValues($attributeCodes, $destinationDocName) { + $destinationDocName = $this->destination->addDocumentPrefix($destinationDocName); /** @var Mysql $adapter */ $adapter = $this->destination->getAdapter(); $structure = $adapter->getDocumentStructure($destinationDocName); diff --git a/src/Migration/Step/Eav/Data.php b/src/Migration/Step/Eav/Data.php index 4667c8199..3e31e60a1 100644 --- a/src/Migration/Step/Eav/Data.php +++ b/src/Migration/Step/Eav/Data.php @@ -223,7 +223,7 @@ protected function migrateEntityTypes() $destinationRecordData = $destinationRecords[$mappingValue]; unset($destinationRecords[$mappingValue]); } else { - $destinationRecordData = array_fill_keys($destinationRecord->getFields(), null); + $destinationRecordData = $destinationRecord->getDataDefault(); } $destinationRecord->setData($destinationRecordData); $this->helper->getRecordTransformer($sourceDocument, $destinationDocument) @@ -436,7 +436,7 @@ protected function migrateAttributes() $destinationRecordData = $destinationRecords[$mappedKey]; unset($destinationRecords[$mappedKey]); } else { - $destinationRecordData = array_fill_keys($destinationRecord->getFields(), null); + $destinationRecordData = $destinationRecord->getDataDefault(); } $destinationRecord->setData($destinationRecordData); @@ -799,7 +799,7 @@ protected function migrateAttributesExtended() $destinationRecordData = $destinationRecords[$mappedId]; unset($destinationRecords[$mappedId]); } else { - $destinationRecordData = array_fill_keys($destinationRecord->getFields(), null); + $destinationRecordData = $destinationRecord->getDataDefault(); } $destinationRecord->setData($destinationRecordData); $this->helper->getRecordTransformer($sourceDocument, $destinationDocument) diff --git a/src/Migration/Step/OrderGridsEE/Delta.php b/src/Migration/Step/OrderGridsEE/Delta.php index a2ea24b6a..543ce002e 100644 --- a/src/Migration/Step/OrderGridsEE/Delta.php +++ b/src/Migration/Step/OrderGridsEE/Delta.php @@ -49,7 +49,7 @@ public function perform() if ($this->source->getRecordsCount($this->source->getDeltaLogName($sourceDocName)) == 0) { continue; } - $items = $this->source->getDeletedRecords($sourceDocName, $idKey, 0, true); + $items = $this->source->getChangedRecords($sourceDocName, $idKey, 0, true); if (empty($items)) { continue; } diff --git a/src/Migration/Step/UrlRewrite/Model/Suffix.php b/src/Migration/Step/UrlRewrite/Model/Suffix.php new file mode 100644 index 000000000..71c7bb717 --- /dev/null +++ b/src/Migration/Step/UrlRewrite/Model/Suffix.php @@ -0,0 +1,100 @@ +source = $source; + } + + /** + * Get suffix query for product or category + * + * @param string $suffixFor Can be 'product' or 'category' + * @param string $mainTable + * @return string + */ + public function getSuffix($suffixFor, $mainTable = 's') + { + $suffixDefault = '.html'; + if (empty($this->suffixData[$suffixFor])) { + /** @var \Migration\ResourceModel\Adapter\Mysql $adapter */ + $adapter = $this->source->getAdapter(); + $select = $adapter->getSelect(); + + $select->from( + ['s' => $this->source->addDocumentPrefix('core_store')], + ['store_id' => 's.store_id'] + ); + + $select->joinLeft( + ['c1' => $this->source->addDocumentPrefix('core_config_data')], + "c1.scope='stores' AND c1.path = 'catalog/seo/{$suffixFor}_url_suffix' AND c1.scope_id=s.store_id", + ['store_path' => 'c1.path', 'store_value' => 'c1.value'] + ); + $select->joinLeft( + ['c2' => $this->source->addDocumentPrefix('core_config_data')], + "c2.scope='websites' AND c2.path = 'catalog/seo/{$suffixFor}_url_suffix' AND c2.scope_id=s.website_id", + ['website_path' => 'c2.path', 'website_value' => 'c2.value'] + ); + $select->joinLeft( + ['c3' => $this->source->addDocumentPrefix('core_config_data')], + "c3.scope='default' AND c3.path = 'catalog/seo/{$suffixFor}_url_suffix'", + ['admin_path' => 'c3.path', 'admin_value' => 'c3.value'] + ); + + $result = $select->getAdapter()->fetchAll($select); + foreach ($result as $row) { + $suffix = $suffixDefault; + if ($row['admin_path'] !== null) { + $suffix = $row['admin_value']; + } + if ($row['website_path'] !== null) { + $suffix = $row['website_value']; + } + if ($row['store_path'] !== null) { + $suffix = $row['store_value']; + } + $this->suffixData[$suffixFor][] = [ + 'store_id' => $row['store_id'], + 'suffix' => $suffix + ]; + } + } + + $suffix = "CASE {$mainTable}.store_id"; + foreach ($this->suffixData[$suffixFor] as $row) { + $suffix .= sprintf(" WHEN '%s' THEN '%s'", $row['store_id'], $row['suffix']); + } + $suffix .= " ELSE '{$suffixDefault}' END"; + + return $suffix; + } +} diff --git a/src/Migration/Step/UrlRewrite/Model/TemporaryTable.php b/src/Migration/Step/UrlRewrite/Model/TemporaryTable.php new file mode 100644 index 000000000..d136c6ba3 --- /dev/null +++ b/src/Migration/Step/UrlRewrite/Model/TemporaryTable.php @@ -0,0 +1,124 @@ +source = $source; + $this->sourceAdapter = $this->source->getAdapter(); + $this->tableName = 'url_rewrite_m2' . md5('url_rewrite_m2'); + } + + /** + * Return name of temporary table + * + * @return string + */ + public function getName() + { + return $this->tableName; + } + + /** + * Crete temporary table + * + * @return void + */ + public function create() + { + $select = $this->sourceAdapter->getSelect(); + $select->getAdapter()->dropTable($this->source->addDocumentPrefix($this->tableName)); + /** @var \Magento\Framework\DB\Ddl\Table $table */ + $table = $select->getAdapter()->newTable($this->source->addDocumentPrefix($this->tableName)) + ->addColumn( + 'id', + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, + null, + ['identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true] + ) + ->addColumn( + 'request_path', + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, + 255 + ) + ->addColumn( + 'target_path', + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, + 255 + ) + ->addColumn( + 'is_system', + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, + null, + ['nullable' => false, 'default' => '0'] + ) + ->addColumn( + 'store_id', + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER + ) + ->addColumn( + 'entity_type', + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, + 32 + ) + ->addColumn( + 'redirect_type', + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, + null, + ['unsigned' => true, 'nullable' => false, 'default' => '0'] + ) + ->addColumn( + 'product_id', + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER + ) + ->addColumn( + 'category_id', + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER + ) + ->addColumn( + 'cms_page_id', + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER + ) + ->addColumn( + 'priority', + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER + ) + ->addIndex( + 'url_rewrite', + ['request_path', 'target_path', 'store_id'], + ['type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE] + ) ; + $select->getAdapter()->createTable($table); + } +} diff --git a/src/Migration/Step/UrlRewrite/Model/Version11300to2000/ProductRewritesIncludedIntoCategories.php b/src/Migration/Step/UrlRewrite/Model/Version11300to2000/ProductRewritesIncludedIntoCategories.php new file mode 100644 index 000000000..d1ec615dd --- /dev/null +++ b/src/Migration/Step/UrlRewrite/Model/Version11300to2000/ProductRewritesIncludedIntoCategories.php @@ -0,0 +1,231 @@ +source = $source; + $this->sourceAdapter = $this->source->getAdapter(); + $this->suffix = $suffix; + $this->temporaryTable = $temporaryTable; + } + + /** + * Return query for retrieving product url rewrites + * when a product is saved for default scope + * + * @return string + */ + public function getQueryProductsSavedForDefaultScope() + { + $select = $this->sourceAdapter->getSelect(); + $storeSubSelect = $this->getStoreSubSelect(); + $categoriesSubSelect = $this->getCategoriesSubSelect(); + $subConcatCategories = $select->getAdapter()->getConcatSql([ + "($categoriesSubSelect)", + "'/'", + '`r`.`request_path`', + $this->suffix->getSuffix('product') + ]); + $targetPath = 'IF(ISNULL(c.category_id), r.target_path, CONCAT(r.target_path, "/category/", c.category_id))'; + $select = $this->sourceAdapter->getSelect(); + $select->from( + ['r' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], + [ + 'id' => 'IFNULL(NULL, NULL)', + 'request_path' => $subConcatCategories, + 'target_path' => $targetPath, + 'is_system' => 'r.is_system', + 'store_id' => 's.store_id', + 'entity_type' => "trim('product')", + 'redirect_type' => "trim('0')", + 'product_id' => "p.entity_id", + 'category_id' => "c.category_id", + 'cms_page_id' => "trim('0')", + 'priority' => "trim('4')" + ] + ); + $select->join( + ['ecpr' => $this->source->addDocumentPrefix('enterprise_catalog_product_rewrite')], + 'ecpr.url_rewrite_id = r.url_rewrite_id', + [] + ); + $select->join( + ['p' => $this->source->addDocumentPrefix('catalog_product_entity_url_key')], + 'r.value_id = p.value_id', + [] + ); + $select->join( + ['c' => $this->source->addDocumentPrefix('catalog_category_product')], + 'p.entity_id = c.product_id', + [] + ); + $select->join( + ['cu' => $this->source->addDocumentPrefix('catalog_category_entity_url_key')], + 'cu.entity_id = c.category_id', + [] + ); + $select->join( + ['cpw' => $this->source->addDocumentPrefix('catalog_product_website')], + 'c.product_id = cpw.product_id', + [] + ); + $select->join( + ['s' => $this->source->addDocumentPrefix('core_store')], + sprintf('cpw.website_id = s.website_id and s.store_id not in (%s)', $storeSubSelect), + [] + ); + $select->where('`ecpr`.`store_id` = 0'); + + $query = $this->sourceAdapter->getSelect()->from(['result' => new \Zend_Db_Expr("($select)")]) + ->where('result.request_path IS NOT NULL') + ->insertFromSelect($this->source->addDocumentPrefix($this->temporaryTable->getName())); + return $query; + } + + /** + * Return query for retrieving product url rewrites + * when a product is saved for particular store view + * + * @return string + */ + public function getQueryProductsSavedForParticularStoreView() + { + $select = $this->sourceAdapter->getSelect(); + $categoriesSubSelect = $this->getCategoriesSubSelect(); + $subConcatCategories = $select->getAdapter()->getConcatSql([ + "($categoriesSubSelect)", + "'/'", + '`s`.`request_path`', + $this->suffix->getSuffix('product', 'ecpr') + ]); + $select->from( + ['s' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], + [ + 'id' => 'IFNULL(NULL, NULL)', + 'request_path' => $subConcatCategories, + 'target_path' => 's.target_path', + 'is_system' => 's.is_system', + 'store_id' => 'ecpr.store_id', + 'entity_type' => "trim('product')", + 'redirect_type' => "trim('0')", + 'product_id' => "p.entity_id", + 'category_id' => "c.category_id", + 'cms_page_id' => "trim('0')", + 'priority' => "trim('4')" + ] + ); + $select->join( + ['ecpr' => $this->source->addDocumentPrefix('enterprise_catalog_product_rewrite')], + 'ecpr.url_rewrite_id = s.url_rewrite_id', + [] + ); + $select->join( + ['p' => $this->source->addDocumentPrefix('catalog_product_entity_url_key')], + 's.value_id = p.value_id and `p`.`store_id` = ecpr.store_id', + [] + ); + $select->join( + ['c' => $this->source->addDocumentPrefix('catalog_category_product')], + 'p.entity_id = c.product_id', + [] + ); + $select->join( + ['cu' => $this->source->addDocumentPrefix('catalog_category_entity_url_key')], + 'cu.entity_id = c.category_id and cu.store_id = ecpr.store_id', + [] + ); + $query = $select + ->where('`ecpr`.`store_id` > 0') + ->insertFromSelect($this->source->addDocumentPrefix($this->temporaryTable->getName())); + return $query; + } + + /** + * Return select for product url rewrite where store above 0 + * + * @return DbSelect + */ + private function getStoreSubSelect() + { + $storeSubSelect = $this->sourceAdapter->getSelect(); + $storeSubSelect->from( + ['sr' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], + ['store_id' => 'ecpr.store_id'] + ); + $storeSubSelect->join( + ['srcu' => $this->source->addDocumentPrefix('catalog_product_entity_url_key')], + 'srcu.value_id = sr.value_id', + [] + ); + $storeSubSelect->join( + ['ecpr' => $this->source->addDocumentPrefix('enterprise_catalog_product_rewrite')], + 'ecpr.url_rewrite_id = sr.url_rewrite_id', + [] + ); + $storeSubSelect + ->where('srcu.entity_id = p.entity_id') + ->where('ecpr.store_id > 0'); + return $storeSubSelect; + } + + /** + * Return sub-select for categories url rewrite + * + * @return DbSelect + */ + private function getCategoriesSubSelect() + { + $subSelect = $this->sourceAdapter->getSelect(); + $subSelect->from( + ['cr' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], + ['request_path' => 'cr.request_path'] + ); + $subSelect->join( + ['ccr' => $this->source->addDocumentPrefix('enterprise_catalog_category_rewrite')], + 'ccr.url_rewrite_id = cr.url_rewrite_id', + [] + ); + $subSelect->where('`cr`.`value_id` = `cu`.`value_id`'); + $subSelect->where('`ccr`.`store_id` = ecpr.`store_id`'); + return $subSelect; + } +} diff --git a/src/Migration/Step/UrlRewrite/Model/Version11300to2000/ProductRewritesWithoutCategories.php b/src/Migration/Step/UrlRewrite/Model/Version11300to2000/ProductRewritesWithoutCategories.php new file mode 100644 index 000000000..c56e2bfde --- /dev/null +++ b/src/Migration/Step/UrlRewrite/Model/Version11300to2000/ProductRewritesWithoutCategories.php @@ -0,0 +1,180 @@ +source = $source; + $this->sourceAdapter = $this->source->getAdapter(); + $this->suffix = $suffix; + $this->temporaryTable = $temporaryTable; + } + + /** + * Return query for retrieving product url rewrites + * when a product is saved for default scope + * + * @return string + */ + public function getQueryProductsSavedForDefaultScope() + { + $select = $this->sourceAdapter->getSelect(); + $storeSubSelect = $this->getStoreSubSelect(); + $subConcat = $select->getAdapter()->getConcatSql([ + '`r`.`request_path`', + $this->suffix->getSuffix('product') + ]); + + $select->from( + ['r' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], + [ + 'id' => 'IFNULL(NULL, NULL)', + 'request_path' => $subConcat, + 'target_path' => 'r.target_path', + 'is_system' => 'r.is_system', + 'store_id' => 's.store_id', + 'entity_type' => "trim('product')", + 'redirect_type' => "trim('0')", + 'product_id' => "p.entity_id", + 'category_id' => "trim('0')", + 'cms_page_id' => "trim('0')", + 'priority' => "trim('4')" + ] + ); + $select->join( + ['ecpr' => $this->source->addDocumentPrefix('enterprise_catalog_product_rewrite')], + 'ecpr.url_rewrite_id = r.url_rewrite_id', + [] + ); + $select->join( + ['p' => $this->source->addDocumentPrefix('catalog_product_entity_url_key')], + 'r.value_id = p.value_id', + [] + ); + $select->join( + ['cpw' => $this->source->addDocumentPrefix('catalog_product_website')], + 'p.entity_id = cpw.product_id', + [] + ); + $select->join( + ['s' => $this->source->addDocumentPrefix('core_store')], + sprintf('cpw.website_id = s.website_id and s.store_id not in (%s)', $storeSubSelect), + [] + ); + $query = $select + ->where('`ecpr`.`store_id` = 0') + ->insertFromSelect($this->source->addDocumentPrefix($this->temporaryTable->getName())); + return $query; + } + + /** + * Return query for retrieving product url rewrites + * when a product is saved for particular store view + * + * @return string + */ + public function getQueryProductsSavedForParticularStoreView() + { + $select = $this->sourceAdapter->getSelect(); + $subConcat = $select->getAdapter()->getConcatSql([ + '`s`.`request_path`', + $this->suffix->getSuffix('product', 'ecpr') + ]); + $select->from( + ['s' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], + [ + 'id' => 'IFNULL(NULL, NULL)', + 'request_path' => $subConcat, + 'target_path' => 's.target_path', + 'is_system' => 's.is_system', + 'store_id' => 'ecpr.store_id', + 'entity_type' => "trim('product')", + 'redirect_type' => "trim('0')", + 'product_id' => "p.entity_id", + 'category_id' => "trim('0')", + 'cms_page_id' => "trim('0')", + 'priority' => "trim('4')" + ] + ); + $select->join( + ['ecpr' => $this->source->addDocumentPrefix('enterprise_catalog_product_rewrite')], + 'ecpr.url_rewrite_id = s.url_rewrite_id', + [] + ); + $select->join( + ['p' => $this->source->addDocumentPrefix('catalog_product_entity_url_key')], + 's.value_id = p.value_id', + [] + ); + $query = $select + ->where('`ecpr`.`store_id` > 0') + ->insertFromSelect($this->source->addDocumentPrefix($this->temporaryTable->getName())); + return $query; + } + + /** + * Return select for product url rewrite where store above 0 + * + * @return DbSelect + */ + private function getStoreSubSelect() + { + $storeSubSelect = $this->sourceAdapter->getSelect(); + $storeSubSelect->from( + ['sr' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], + ['store_id' => 'ecpr.store_id'] + ); + $storeSubSelect->join( + ['srcu' => $this->source->addDocumentPrefix('catalog_product_entity_url_key')], + 'srcu.value_id = sr.value_id', + [] + ); + $storeSubSelect->join( + ['ecpr' => $this->source->addDocumentPrefix('enterprise_catalog_product_rewrite')], + 'ecpr.url_rewrite_id = sr.url_rewrite_id', + [] + ); + $storeSubSelect + ->where('srcu.entity_id = p.entity_id') + ->where('ecpr.store_id > 0'); + return $storeSubSelect; + } +} diff --git a/src/Migration/Step/UrlRewrite/Model/Version11410to2000/ProductRewritesIncludedIntoCategories.php b/src/Migration/Step/UrlRewrite/Model/Version11410to2000/ProductRewritesIncludedIntoCategories.php new file mode 100644 index 000000000..91538c0fb --- /dev/null +++ b/src/Migration/Step/UrlRewrite/Model/Version11410to2000/ProductRewritesIncludedIntoCategories.php @@ -0,0 +1,213 @@ +source = $source; + $this->sourceAdapter = $this->source->getAdapter(); + $this->suffix = $suffix; + $this->temporaryTable = $temporaryTable; + } + + /** + * Return query for retrieving product url rewrites + * when a product is saved for default scope + * + * @return string + */ + public function getQueryProductsSavedForDefaultScope() + { + $select = $this->sourceAdapter->getSelect(); + $storeSubSelect = $this->getStoreSubSelect(); + $categoriesSubSelect = $this->getCategoriesSubSelect(); + $subConcatCategories = $select->getAdapter()->getConcatSql([ + "($categoriesSubSelect)", + "'/'", + '`r`.`request_path`', + $this->suffix->getSuffix('product') + ]); + $targetPath = 'IF(ISNULL(c.category_id), r.target_path, CONCAT(r.target_path, "/category/", c.category_id))'; + $select = $this->sourceAdapter->getSelect(); + $select->from( + ['r' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], + [ + 'id' => 'IFNULL(NULL, NULL)', + 'request_path' => $subConcatCategories, + 'target_path' => $targetPath, + 'is_system' => 'r.is_system', + 'store_id' => 's.store_id', + 'entity_type' => "trim('product')", + 'redirect_type' => "trim('0')", + 'product_id' => "p.entity_id", + 'category_id' => "c.category_id", + 'cms_page_id' => "trim('0')", + 'priority' => "trim('4')" + ] + ); + $select->join( + ['p' => $this->source->addDocumentPrefix('catalog_product_entity_url_key')], + 'r.value_id = p.value_id', + [] + ); + $select->join( + ['c' => $this->source->addDocumentPrefix('catalog_category_product')], + 'p.entity_id = c.product_id', + [] + ); + $select->join( + ['cu' => $this->source->addDocumentPrefix('catalog_category_entity_url_key')], + 'cu.entity_id = c.category_id', + [] + ); + $select->join( + ['cpw' => $this->source->addDocumentPrefix('catalog_product_website')], + 'c.product_id = cpw.product_id', + [] + ); + $select->join( + ['s' => $this->source->addDocumentPrefix('core_store')], + sprintf('cpw.website_id = s.website_id and s.store_id not in (%s)', $storeSubSelect), + [] + ); + $select->where('`r`.`entity_type` = 3')->where('`r`.`store_id` = 0'); + + $query = $this->sourceAdapter->getSelect()->from(['result' => new \Zend_Db_Expr("($select)")]) + ->where('result.request_path IS NOT NULL') + ->insertFromSelect($this->source->addDocumentPrefix($this->temporaryTable->getName())) + ; + return $query; + } + + /** + * Return query for retrieving product url rewrites + * when a product is saved for particular store view + * + * @return string + */ + public function getQueryProductsSavedForParticularStoreView() + { + $select = $this->sourceAdapter->getSelect(); + $categoriesSubSelect = $this->getCategoriesSubSelect(); + $subConcatCategories = $select->getAdapter()->getConcatSql([ + "($categoriesSubSelect)", + "'/'", + '`s`.`request_path`', + $this->suffix->getSuffix('product') + ]); + $select->from( + ['s' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], + [ + 'id' => 'IFNULL(NULL, NULL)', + 'request_path' => $subConcatCategories, + 'target_path' => 's.target_path', + 'is_system' => 's.is_system', + 'store_id' => 's.store_id', + 'entity_type' => "trim('product')", + 'redirect_type' => "trim('0')", + 'product_id' => "p.entity_id", + 'category_id' => "c.category_id", + 'cms_page_id' => "trim('0')", + 'priority' => "trim('4')" + ] + ); + $select->join( + ['p' => $this->source->addDocumentPrefix('catalog_product_entity_url_key')], + 's.value_id = p.value_id', + [] + ); + $select->join( + ['c' => $this->source->addDocumentPrefix('catalog_category_product')], + 'p.entity_id = c.product_id', + [] + ); + $select->join( + ['cu' => $this->source->addDocumentPrefix('catalog_category_entity_url_key')], + 'cu.entity_id = c.category_id', + [] + ); + $query = $select->where('`s`.`entity_type` = 3') + ->where('`s`.`store_id` > 0') + ->insertFromSelect($this->source->addDocumentPrefix($this->temporaryTable->getName())); + return $query; + } + + /** + * Return select for product url rewrite where store above 0 + * + * @return DbSelect + */ + private function getStoreSubSelect() + { + $storeSubSelect = $this->sourceAdapter->getSelect(); + $storeSubSelect->from( + ['sr' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], + ['store_id' => 'sr.store_id'] + ); + $storeSubSelect->join( + ['srcu' => $this->source->addDocumentPrefix('catalog_product_entity_url_key')], + 'srcu.value_id = sr.value_id', + [] + ); + $storeSubSelect->where('sr.entity_type = 3') + ->where('srcu.entity_id = p.entity_id') + ->where('sr.store_id > 0'); + return $storeSubSelect; + } + + /** + * Return sub-select for categories url rewrite + * + * @return DbSelect + */ + private function getCategoriesSubSelect() + { + $subSelect = $this->sourceAdapter->getSelect(); + $subSelect->from( + ['cr' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], + ['request_path' => 'cr.request_path'] + ); + $subSelect->where('`cr`.`value_id` = `cu`.`value_id`'); + $subSelect->where('`cr`.`entity_type` = 2'); + $subSelect->where('`cr`.`store_id` = s.`store_id`'); + return $subSelect; + } +} diff --git a/src/Migration/Step/UrlRewrite/Model/Version11410to2000/ProductRewritesWithoutCategories.php b/src/Migration/Step/UrlRewrite/Model/Version11410to2000/ProductRewritesWithoutCategories.php new file mode 100644 index 000000000..bf265be54 --- /dev/null +++ b/src/Migration/Step/UrlRewrite/Model/Version11410to2000/ProductRewritesWithoutCategories.php @@ -0,0 +1,165 @@ +source = $source; + $this->sourceAdapter = $this->source->getAdapter(); + $this->suffix = $suffix; + $this->temporaryTable = $temporaryTable; + } + + /** + * Return query for retrieving product url rewrites + * when a product is saved for default scope + * + * @return string + */ + public function getQueryProductsSavedForDefaultScope() + { + $storeSubSelect = $this->getStoreSubSelect(); + $subConcat = $this->sourceAdapter->getSelect()->getAdapter()->getConcatSql([ + '`r`.`request_path`', + $this->suffix->getSuffix('product') + ]); + + $select = $this->sourceAdapter->getSelect(); + $select->from( + ['r' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], + [ + 'id' => 'IFNULL(NULL, NULL)', + 'request_path' => $subConcat, + 'target_path' => 'r.target_path', + 'is_system' => 'r.is_system', + 'store_id' => 's.store_id', + 'entity_type' => "trim('product')", + 'redirect_type' => "trim('0')", + 'product_id' => "p.entity_id", + 'category_id' => "trim('0')", + 'cms_page_id' => "trim('0')", + 'priority' => "trim('4')" + ] + ); + $select->join( + ['p' => $this->source->addDocumentPrefix('catalog_product_entity_url_key')], + 'r.value_id = p.value_id', + [] + ); + $select->join( + ['cpw' => $this->source->addDocumentPrefix('catalog_product_website')], + 'p.entity_id = cpw.product_id', + [] + ); + $select->join( + ['s' => $this->source->addDocumentPrefix('core_store')], + sprintf('cpw.website_id = s.website_id and s.store_id not in (%s)', $storeSubSelect), + [] + ); + $query = $select->where('`r`.`entity_type` = 3') + ->where('`r`.`store_id` = 0') + ->insertFromSelect($this->source->addDocumentPrefix($this->temporaryTable->getName())); + return $query; + } + + /** + * Return query for retrieving product url rewrites + * when a product is saved for particular store view + * + * @return string + */ + public function getQueryProductsSavedForParticularStoreView() + { + $select = $this->sourceAdapter->getSelect(); + $subConcat = $select->getAdapter()->getConcatSql([ + '`s`.`request_path`', + $this->suffix->getSuffix('product') + ]); + $select->from( + ['s' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], + [ + 'id' => 'IFNULL(NULL, NULL)', + 'request_path' => $subConcat, + 'target_path' => 's.target_path', + 'is_system' => 's.is_system', + 'store_id' => 's.store_id', + 'entity_type' => "trim('product')", + 'redirect_type' => "trim('0')", + 'product_id' => "p.entity_id", + 'category_id' => "trim('0')", + 'cms_page_id' => "trim('0')", + 'priority' => "trim('4')" + ] + ); + $select->join( + ['p' => $this->source->addDocumentPrefix('catalog_product_entity_url_key')], + 's.value_id = p.value_id', + [] + ); + $query = $select->where('`s`.`entity_type` = 3') + ->where('`s`.`store_id` > 0') + ->insertFromSelect($this->source->addDocumentPrefix($this->temporaryTable->getName())); + return $query; + } + + /** + * Return select for product url rewrite where store above 0 + * + * @return DbSelect + */ + private function getStoreSubSelect() + { + $storeSubSelect = $this->sourceAdapter->getSelect(); + $storeSubSelect->from( + ['sr' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], + ['store_id' => 'sr.store_id'] + ); + $storeSubSelect->join( + ['srcu' => $this->source->addDocumentPrefix('catalog_product_entity_url_key')], + 'srcu.value_id = sr.value_id', + [] + ); + $storeSubSelect->where('sr.entity_type = 3') + ->where('srcu.entity_id = p.entity_id') + ->where('sr.store_id > 0'); + return $storeSubSelect; + } +} diff --git a/src/Migration/Step/UrlRewrite/Version11300to2000.php b/src/Migration/Step/UrlRewrite/Version11300to2000.php index 0e253e014..277044979 100644 --- a/src/Migration/Step/UrlRewrite/Version11300to2000.php +++ b/src/Migration/Step/UrlRewrite/Version11300to2000.php @@ -10,22 +10,18 @@ use Migration\Reader\MapInterface; use Migration\Step\DatabaseStage; use Migration\ResourceModel\Document; +use Migration\Step\UrlRewrite\Model; /** * Class Version11300to2000 - * @SuppressWarnings(PHPMD.TooManyFields) - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD) */ class Version11300to2000 extends DatabaseStage implements StageInterface, RollbackInterface { /** - * Temporary table name - * - * @var string + * @var Model\TemporaryTable */ - protected $tableName; + private $temporaryTable; /** * @var string @@ -109,6 +105,21 @@ class Version11300to2000 extends DatabaseStage implements StageInterface, Rollba */ protected $helper; + /** + * @var Model\Version11300to2000\ProductRewritesIncludedIntoCategories + */ + private $productRewritesIncludedIntoCategories; + + /** + * @var Model\Version11300to2000\ProductRewritesWithoutCategories + */ + private $productRewritesWithoutCategories; + + /** + * @var Model\Suffix + */ + private $suffix; + /** * @var array */ @@ -192,6 +203,10 @@ class Version11300to2000 extends DatabaseStage implements StageInterface, Rollba * @param \Migration\ResourceModel\Record\CollectionFactory $recordCollectionFactory * @param \Migration\ResourceModel\RecordFactory $recordFactory * @param \Migration\Step\UrlRewrite\Helper $helper + * @param Model\Version11300to2000\ProductRewritesWithoutCategories $productRewritesWithoutCategories + * @param Model\Version11300to2000\ProductRewritesIncludedIntoCategories $productRewritesIncludedIntoCategories + * @param Model\Suffix $suffix + * @param Model\TemporaryTable $temporaryTable * @param string $stage * @throws \Migration\Exception */ @@ -204,6 +219,10 @@ public function __construct( \Migration\ResourceModel\Record\CollectionFactory $recordCollectionFactory, \Migration\ResourceModel\RecordFactory $recordFactory, \Migration\Step\UrlRewrite\Helper $helper, + Model\Version11300to2000\ProductRewritesWithoutCategories $productRewritesWithoutCategories, + Model\Version11300to2000\ProductRewritesIncludedIntoCategories $productRewritesIncludedIntoCategories, + Model\Suffix $suffix, + Model\TemporaryTable $temporaryTable, $stage ) { $this->progress = $progress; @@ -212,9 +231,12 @@ public function __construct( $this->destination = $destination; $this->recordCollectionFactory = $recordCollectionFactory; $this->recordFactory = $recordFactory; - $this->tableName = 'url_rewrite_m2' . md5('url_rewrite_m2'); + $this->temporaryTable = $temporaryTable; $this->stage = $stage; $this->helper = $helper; + $this->productRewritesWithoutCategories = $productRewritesWithoutCategories; + $this->productRewritesIncludedIntoCategories = $productRewritesIncludedIntoCategories; + $this->suffix = $suffix; parent::__construct($config); } @@ -242,7 +264,7 @@ protected function data() $this->progress->start($this->getIterationsCount()); $this->destination->clearDocument('url_rewrite'); - $sourceDocument = $this->source->getDocument($this->tableName); + $sourceDocument = $this->source->getDocument($this->temporaryTable->getName()); $destinationDocument = $this->destination->getDocument('url_rewrite'); $destProductCategory = $this->destination->getDocument('catalog_url_rewrite_product_category'); @@ -311,7 +333,7 @@ protected function getRewritesSelect() /** @var \Migration\ResourceModel\Adapter\Mysql $adapter */ $adapter = $this->source->getAdapter(); $select = $adapter->getSelect(); - $select->from(['r' => $this->source->addDocumentPrefix($this->tableName)]); + $select->from(['r' => $this->source->addDocumentPrefix($this->temporaryTable->getName())]); return $select; } @@ -328,7 +350,7 @@ protected function migrateRewrites($source, $destination) $destinationRecord = $this->recordFactory->create(); $destinationRecord->setStructure($destination->getStructure()); - $destinationRecord->setValue('url_rewrite_id', null); + $destinationRecord->setValue('url_rewrite_id', $sourceRecord->getValue('id')); $destinationRecord->setValue('store_id', $sourceRecord->getValue('store_id')); $destinationRecord->setValue('description', $sourceRecord->getValue('description')); $destinationRecord->setValue('redirect_type', 0); @@ -539,7 +561,7 @@ protected function volume() $this->progress->start(1); $this->getRewritesSelect(); $this->progress->advance(); - $result = $this->source->getRecordsCount($this->tableName) + $result = $this->source->getRecordsCount($this->temporaryTable->getName()) == $this->destination->getRecordsCount('url_rewrite'); if (!$result) { $this->logger->error('Mismatch of entities in the document: url_rewrite'); @@ -555,7 +577,7 @@ protected function volume() */ protected function getIterationsCount() { - return $this->source->getRecordsCount($this->tableName) + return $this->source->getRecordsCount($this->temporaryTable->getName()) + $this->source->getRecordsCount('catalog_category_entity_url_key') + $this->source->getRecordsCount('catalog_product_entity_url_key'); } @@ -574,7 +596,7 @@ protected function getDuplicatesList() /** @var \Magento\Framework\DB\Select $select */ $select = $adapter->getSelect(); - $select->from(['t' => $this->source->addDocumentPrefix($this->tableName)], ['t.*']) + $select->from(['t' => $this->source->addDocumentPrefix($this->temporaryTable->getName())], ['t.*']) ->join( ['t2' => new \Zend_Db_Expr(sprintf('(%s)', $subSelect->assemble()))], 't2.request_path = t.request_path AND t2.store_id = t.store_id', @@ -586,70 +608,6 @@ protected function getDuplicatesList() return $resultData; } - /** - * Get product suffix query - * - * @codeCoverageIgnore - * @param string $suffixFor Can be 'product' or 'category' - * @param string $mainTable - * @return string - */ - protected function getSuffix($suffixFor, $mainTable = 's') - { - if (empty($this->suffixData[$suffixFor])) { - /** @var \Migration\ResourceModel\Adapter\Mysql $adapter */ - $adapter = $this->source->getAdapter(); - $select = $adapter->getSelect(); - - $select->from( - ['s' => $this->source->addDocumentPrefix('core_store')], - ['store_id' => 's.store_id'] - ); - - $select->joinLeft( - ['c1' => $this->source->addDocumentPrefix('core_config_data')], - "c1.scope='stores' AND c1.path = 'catalog/seo/{$suffixFor}_url_suffix' AND c1.scope_id=s.store_id", - ['store_path' => 'c1.path', 'store_value' => 'c1.value'] - ); - $select->joinLeft( - ['c2' => $this->source->addDocumentPrefix('core_config_data')], - "c2.scope='websites' AND c2.path = 'catalog/seo/{$suffixFor}_url_suffix' AND c2.scope_id=s.website_id", - ['website_path' => 'c2.path', 'website_value' => 'c2.value'] - ); - $select->joinLeft( - ['c3' => $this->source->addDocumentPrefix('core_config_data')], - "c3.scope='default' AND c3.path = 'catalog/seo/{$suffixFor}_url_suffix'", - ['admin_path' => 'c3.path', 'admin_value' => 'c3.value'] - ); - - $result = $select->getAdapter()->fetchAll($select); - foreach ($result as $row) { - $suffix = 'html'; - if ($row['admin_path'] !== null) { - $suffix = $row['admin_value']; - } - if ($row['website_path'] !== null) { - $suffix = $row['website_value']; - } - if ($row['store_path'] !== null) { - $suffix = $row['store_value']; - } - $this->suffixData[$suffixFor][] = [ - 'store_id' => $row['store_id'], - 'suffix' => $suffix ? '.' . $suffix : '' - ]; - } - } - - $suffix = "CASE {$mainTable}.store_id"; - foreach ($this->suffixData[$suffixFor] as $row) { - $suffix .= sprintf(" WHEN '%s' THEN '%s'", $row['store_id'], $row['suffix']); - } - $suffix .= " ELSE '.html' END"; - - return $suffix; - } - /** * Initialize temporary table and insert UrlRewrite data * @@ -661,7 +619,7 @@ protected function initTemporaryTable() { /** @var \Migration\ResourceModel\Adapter\Mysql $adapter */ $adapter = $this->source->getAdapter(); - $this->createTemporaryTable($adapter); + $this->temporaryTable->create(); $this->collectRedirects($adapter); $this->collectProductRewrites($adapter); $this->collectCategoryRewrites($adapter); @@ -669,79 +627,6 @@ protected function initTemporaryTable() self::$dataInitialized = true; } - /** - * Crete temporary table - * - * @param \Migration\ResourceModel\Adapter\Mysql $adapter - * @return void - */ - protected function createTemporaryTable(\Migration\ResourceModel\Adapter\Mysql $adapter) - { - $select = $adapter->getSelect(); - $select->getAdapter()->dropTable($this->source->addDocumentPrefix($this->tableName)); - /** @var \Magento\Framework\DB\Ddl\Table $table */ - $table = $select->getAdapter()->newTable($this->source->addDocumentPrefix($this->tableName)) - ->addColumn( - 'id', - \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, - null, - ['identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true] - ) - ->addColumn( - 'request_path', - \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, - 255 - ) - ->addColumn( - 'target_path', - \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, - 255 - ) - ->addColumn( - 'is_system', - \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, - null, - ['nullable' => false, 'default' => '0'] - ) - ->addColumn( - 'store_id', - \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER - ) - ->addColumn( - 'entity_type', - \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, - 32 - ) - ->addColumn( - 'redirect_type', - \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, - null, - ['unsigned' => true, 'nullable' => false, 'default' => '0'] - ) - ->addColumn( - 'product_id', - \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER - ) - ->addColumn( - 'category_id', - \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER - ) - ->addColumn( - 'cms_page_id', - \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER - ) - ->addColumn( - 'priority', - \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER - ) - ->addIndex( - 'url_rewrite', - ['request_path', 'target_path', 'store_id'], - ['type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE] - ) ; - $select->getAdapter()->createTable($table); - } - /** * Fulfill temporary table with category url rewrites * @@ -750,12 +635,13 @@ protected function createTemporaryTable(\Migration\ResourceModel\Adapter\Mysql $ */ protected function collectCategoryRewrites(\Migration\ResourceModel\Adapter\Mysql $adapter) { + $requestPath = sprintf("CONCAT(`r`.`request_path`, %s)", $this->suffix->getSuffix('category', 'eccr')); $select = $adapter->getSelect(); $select->from( ['r' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], [ 'id' => 'IFNULL(NULL, NULL)', - 'request_path' => sprintf("CONCAT(`r`.`request_path`, %s)", $this->getSuffix('category', 'eccr')), + 'request_path' => $requestPath, 'target_path' => 'r.target_path', 'is_system' => 'r.is_system', 'store_id' => 's.store_id', @@ -784,14 +670,16 @@ protected function collectCategoryRewrites(\Migration\ResourceModel\Adapter\Mysq ); $query = $select - ->insertFromSelect($this->source->addDocumentPrefix($this->tableName)); + ->insertFromSelect($this->source->addDocumentPrefix($this->temporaryTable->getName())); $select->getAdapter()->query($query); + + $requestPath = sprintf("CONCAT(`r`.`request_path`, %s)", $this->suffix->getSuffix('category', 'eccr')); $select = $adapter->getSelect(); $select->from( ['r' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], [ 'id' => 'IFNULL(NULL, NULL)', - 'request_path' => sprintf("CONCAT(`r`.`request_path`, %s)", $this->getSuffix('category', 'eccr')), + 'request_path' => $requestPath, 'target_path' => 'r.target_path', 'is_system' => 'r.is_system', 'store_id' => 'eccr.store_id', @@ -815,7 +703,7 @@ protected function collectCategoryRewrites(\Migration\ResourceModel\Adapter\Mysq ); $query = $select - ->insertFromSelect($this->source->addDocumentPrefix($this->tableName)); + ->insertFromSelect($this->source->addDocumentPrefix($this->temporaryTable->getName())); $select->getAdapter()->query($query); } @@ -848,7 +736,7 @@ protected function collectCmsPageRewrites(\Migration\ResourceModel\Adapter\Mysql 'cps.page_id = cp.page_id', [] )->group(['request_path', 'cps.store_id']); - $query = $select->insertFromSelect($this->source->addDocumentPrefix($this->tableName)); + $query = $select->insertFromSelect($this->source->addDocumentPrefix($this->temporaryTable->getName())); $select->getAdapter()->query($query); } @@ -860,232 +748,13 @@ protected function collectCmsPageRewrites(\Migration\ResourceModel\Adapter\Mysql */ protected function collectProductRewrites(\Migration\ResourceModel\Adapter\Mysql $adapter) { - /** @var \Magento\Framework\Db\Select $select */ - $select = $adapter->getSelect(); - $subSelect = $adapter->getSelect(); - $subSelect->from( - ['cr' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], - ['request_path' => 'cr.request_path'] - ); - $subSelect->join( - ['ccr' => $this->source->addDocumentPrefix('enterprise_catalog_category_rewrite')], - 'ccr.url_rewrite_id = cr.url_rewrite_id', - [] - ); - $subSelect->where('`cr`.`value_id` = `cu`.`value_id`'); - //$subSelect->where('`cr`.`entity_type` = 2'); - $subSelect->where('`ccr`.`store_id` = ecpr.`store_id`'); - $subConcatCategories = $select->getAdapter()->getConcatSql([ - "($subSelect)", - "'/'", - '`r`.`request_path`', - $this->getSuffix('product') - ]); - $storeSubSelect = $adapter->getSelect(); - $storeSubSelect->from( - ['sr' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], - ['store_id' => 'ecpr.store_id'] - ); - $storeSubSelect->join( - ['srcu' => $this->source->addDocumentPrefix('catalog_product_entity_url_key')], - 'srcu.value_id = sr.value_id', - [] - ); - $storeSubSelect->join( - ['ecpr' => $this->source->addDocumentPrefix('enterprise_catalog_product_rewrite')], - 'ecpr.url_rewrite_id = sr.url_rewrite_id', - [] - ); - $storeSubSelect - ->where('srcu.entity_id = p.entity_id') - ->where('ecpr.store_id > 0'); - - $targetPath = 'IF(ISNULL(c.category_id), r.target_path, CONCAT(r.target_path, "/category/", c.category_id))'; - $select = $adapter->getSelect(); - $select->from( - ['r' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], - [ - 'id' => 'IFNULL(NULL, NULL)', - 'request_path' => $subConcatCategories, - 'target_path' => $targetPath, - 'is_system' => 'r.is_system', - 'store_id' => 's.store_id', - 'entity_type' => "trim('product')", - 'redirect_type' => "trim('0')", - 'product_id' => "p.entity_id", - 'category_id' => "c.category_id", - 'cms_page_id' => "trim('0')", - 'priority' => "trim('4')" - ] - ); - $select->join( - ['ecpr' => $this->source->addDocumentPrefix('enterprise_catalog_product_rewrite')], - 'ecpr.url_rewrite_id = r.url_rewrite_id', - [] - ); - $select->join( - ['p' => $this->source->addDocumentPrefix('catalog_product_entity_url_key')], - 'r.value_id = p.value_id', - [] - ); - $select->join( - ['c' => $this->source->addDocumentPrefix('catalog_category_product')], - 'p.entity_id = c.product_id', - [] - ); - $select->join( - ['cu' => $this->source->addDocumentPrefix('catalog_category_entity_url_key')], - 'cu.entity_id = c.category_id', - [] - ); - $select->join( - ['cpw' => $this->source->addDocumentPrefix('catalog_product_website')], - 'c.product_id = cpw.product_id', - [] - ); - $select->join( - ['s' => $this->source->addDocumentPrefix('core_store')], - sprintf('cpw.website_id = s.website_id and s.store_id not in (%s)', $storeSubSelect), - [] - ); - $select->where('`ecpr`.`store_id` = 0'); - - $query = $adapter->getSelect()->from(['result' => new \Zend_Db_Expr("($select)")]) - ->where('result.request_path IS NOT NULL') - ->insertFromSelect($this->source->addDocumentPrefix($this->tableName)); - $select->getAdapter()->query($query); - - $select = $adapter->getSelect(); - $subConcat = $select->getAdapter()->getConcatSql([ - '`r`.`request_path`', - $this->getSuffix('product') - ]); - - $select = $adapter->getSelect(); - $select->from( - ['r' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], - [ - 'id' => 'IFNULL(NULL, NULL)', - 'request_path' => $subConcat, - 'target_path' => 'r.target_path', - 'is_system' => 'r.is_system', - 'store_id' => 's.store_id', - 'entity_type' => "trim('product')", - 'redirect_type' => "trim('0')", - 'product_id' => "p.entity_id", - 'category_id' => "trim('0')", - 'cms_page_id' => "trim('0')", - 'priority' => "trim('4')" - ] - ); - $select->join( - ['ecpr' => $this->source->addDocumentPrefix('enterprise_catalog_product_rewrite')], - 'ecpr.url_rewrite_id = r.url_rewrite_id', - [] - ); - $select->join( - ['p' => $this->source->addDocumentPrefix('catalog_product_entity_url_key')], - 'r.value_id = p.value_id', - [] - ); - $select->join( - ['cpw' => $this->source->addDocumentPrefix('catalog_product_website')], - 'p.entity_id = cpw.product_id', - [] - ); - $select->join( - ['s' => $this->source->addDocumentPrefix('core_store')], - sprintf('cpw.website_id = s.website_id and s.store_id not in (%s)', $storeSubSelect), - [] - ); - $query = $select - ->where('`ecpr`.`store_id` = 0') - ->insertFromSelect($this->source->addDocumentPrefix($this->tableName)); - $select->getAdapter()->query($query); - - $select = $adapter->getSelect(); - $subConcatCategories = $select->getAdapter()->getConcatSql([ - "($subSelect)", - "'/'", - '`s`.`request_path`', - $this->getSuffix('product', 'ecpr') - ]); - $select->from( - ['s' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], - [ - 'id' => 'IFNULL(NULL, NULL)', - 'request_path' => $subConcatCategories, - 'target_path' => 's.target_path', - 'is_system' => 's.is_system', - 'store_id' => 'ecpr.store_id', - 'entity_type' => "trim('product')", - 'redirect_type' => "trim('0')", - 'product_id' => "p.entity_id", - 'category_id' => "c.category_id", - 'cms_page_id' => "trim('0')", - 'priority' => "trim('4')" - ] - ); - $select->join( - ['ecpr' => $this->source->addDocumentPrefix('enterprise_catalog_product_rewrite')], - 'ecpr.url_rewrite_id = s.url_rewrite_id', - [] - ); - $select->join( - ['p' => $this->source->addDocumentPrefix('catalog_product_entity_url_key')], - 's.value_id = p.value_id and `p`.`store_id` = ecpr.store_id', - [] - ); - $select->join( - ['c' => $this->source->addDocumentPrefix('catalog_category_product')], - 'p.entity_id = c.product_id', - [] - ); - $select->join( - ['cu' => $this->source->addDocumentPrefix('catalog_category_entity_url_key')], - 'cu.entity_id = c.category_id and cu.store_id = ecpr.store_id', - [] - ); - $query = $select - ->where('`ecpr`.`store_id` > 0') - ->insertFromSelect($this->source->addDocumentPrefix($this->tableName)); - $select->getAdapter()->query($query); - - $select = $adapter->getSelect(); - $subConcat = $select->getAdapter()->getConcatSql([ - '`s`.`request_path`', - $this->getSuffix('product', 'ecpr') - ]); - $select->from( - ['s' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], - [ - 'id' => 'IFNULL(NULL, NULL)', - 'request_path' => $subConcat, - 'target_path' => 's.target_path', - 'is_system' => 's.is_system', - 'store_id' => 'ecpr.store_id', - 'entity_type' => "trim('product')", - 'redirect_type' => "trim('0')", - 'product_id' => "p.entity_id", - 'category_id' => "trim('0')", - 'cms_page_id' => "trim('0')", - 'priority' => "trim('4')" - ] - ); - $select->join( - ['ecpr' => $this->source->addDocumentPrefix('enterprise_catalog_product_rewrite')], - 'ecpr.url_rewrite_id = s.url_rewrite_id', - [] - ); - $select->join( - ['p' => $this->source->addDocumentPrefix('catalog_product_entity_url_key')], - 's.value_id = p.value_id', - [] - ); - $query = $select - ->where('`ecpr`.`store_id` > 0') - ->insertFromSelect($this->source->addDocumentPrefix($this->tableName)); - $select->getAdapter()->query($query); + $queryExecute = function ($query) use ($adapter) { + $adapter->getSelect()->getAdapter()->query($query); + }; + $queryExecute($this->productRewritesWithoutCategories->getQueryProductsSavedForDefaultScope()); + $queryExecute($this->productRewritesWithoutCategories->getQueryProductsSavedForParticularStoreView()); + $queryExecute($this->productRewritesIncludedIntoCategories->getQueryProductsSavedForDefaultScope()); + $queryExecute($this->productRewritesIncludedIntoCategories->getQueryProductsSavedForParticularStoreView()); } /** @@ -1130,7 +799,7 @@ protected function collectRedirects(\Migration\ResourceModel\Adapter\Mysql $adap ); $query = $select - ->insertFromSelect($this->source->addDocumentPrefix($this->tableName)); + ->insertFromSelect($this->source->addDocumentPrefix($this->temporaryTable->getName())); $select->getAdapter()->query($query); } diff --git a/src/Migration/Step/UrlRewrite/Version11410to2000.php b/src/Migration/Step/UrlRewrite/Version11410to2000.php index 2a600c839..06f2f7d93 100644 --- a/src/Migration/Step/UrlRewrite/Version11410to2000.php +++ b/src/Migration/Step/UrlRewrite/Version11410to2000.php @@ -10,22 +10,18 @@ use Migration\Reader\MapInterface; use Migration\Step\DatabaseStage; use Migration\ResourceModel\Document; +use Migration\Step\UrlRewrite\Model; /** * Class Version11410to2000 - * @SuppressWarnings(PHPMD.TooManyFields) - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD) */ class Version11410to2000 extends DatabaseStage implements StageInterface, RollbackInterface { /** - * Temporary table name - * - * @var string + * @var Model\TemporaryTable */ - protected $tableName; + private $temporaryTable; /** * @var string @@ -109,6 +105,21 @@ class Version11410to2000 extends DatabaseStage implements StageInterface, Rollba */ protected $helper; + /** + * @var Model\Version11410to2000\ProductRewritesIncludedIntoCategories + */ + private $productRewritesIncludedIntoCategories; + + /** + * @var Model\Version11410to2000\ProductRewritesWithoutCategories + */ + private $productRewritesWithoutCategories; + + /** + * @var Model\Suffix + */ + private $suffix; + /** * @var array */ @@ -197,6 +208,10 @@ class Version11410to2000 extends DatabaseStage implements StageInterface, Rollba * @param \Migration\ResourceModel\Record\CollectionFactory $recordCollectionFactory * @param \Migration\ResourceModel\RecordFactory $recordFactory * @param \Migration\Step\UrlRewrite\Helper $helper + * @param Model\Version11410to2000\ProductRewritesWithoutCategories $productRewritesWithoutCategories + * @param Model\Version11410to2000\ProductRewritesIncludedIntoCategories $productRewritesIncludedIntoCategories + * @param Model\Suffix $suffix + * @param Model\TemporaryTable $temporaryTable * @param string $stage * @throws \Migration\Exception */ @@ -208,7 +223,11 @@ public function __construct( \Migration\ResourceModel\Destination $destination, \Migration\ResourceModel\Record\CollectionFactory $recordCollectionFactory, \Migration\ResourceModel\RecordFactory $recordFactory, - \Migration\Step\UrlRewrite\Helper $helper, + Helper $helper, + Model\Version11410to2000\ProductRewritesWithoutCategories $productRewritesWithoutCategories, + Model\Version11410to2000\ProductRewritesIncludedIntoCategories $productRewritesIncludedIntoCategories, + Model\Suffix $suffix, + Model\TemporaryTable $temporaryTable, $stage ) { $this->progress = $progress; @@ -217,9 +236,12 @@ public function __construct( $this->destination = $destination; $this->recordCollectionFactory = $recordCollectionFactory; $this->recordFactory = $recordFactory; - $this->tableName = 'url_rewrite_m2' . md5('url_rewrite_m2'); + $this->temporaryTable = $temporaryTable; $this->stage = $stage; $this->helper = $helper; + $this->productRewritesWithoutCategories = $productRewritesWithoutCategories; + $this->productRewritesIncludedIntoCategories = $productRewritesIncludedIntoCategories; + $this->suffix = $suffix; parent::__construct($config); } @@ -247,7 +269,7 @@ protected function data() $this->progress->start($this->getIterationsCount()); $this->destination->clearDocument('url_rewrite'); - $sourceDocument = $this->source->getDocument($this->tableName); + $sourceDocument = $this->source->getDocument($this->temporaryTable->getName()); $destinationDocument = $this->destination->getDocument('url_rewrite'); $destProductCategory = $this->destination->getDocument('catalog_url_rewrite_product_category'); @@ -316,7 +338,7 @@ protected function getRewritesSelect() /** @var \Migration\ResourceModel\Adapter\Mysql $adapter */ $adapter = $this->source->getAdapter(); $select = $adapter->getSelect(); - $select->from(['r' => $this->source->addDocumentPrefix($this->tableName)]); + $select->from(['r' => $this->source->addDocumentPrefix($this->temporaryTable->getName())]); return $select; } @@ -333,7 +355,7 @@ protected function migrateRewrites($source, $destination) $destinationRecord = $this->recordFactory->create(); $destinationRecord->setStructure($destination->getStructure()); - $destinationRecord->setValue('url_rewrite_id', null); + $destinationRecord->setValue('url_rewrite_id', $sourceRecord->getValue('id')); $destinationRecord->setValue('store_id', $sourceRecord->getValue('store_id')); $destinationRecord->setValue('description', $sourceRecord->getValue('description')); $destinationRecord->setValue('redirect_type', 0); @@ -544,7 +566,7 @@ protected function volume() $this->progress->start(1); $this->getRewritesSelect(); $this->progress->advance(); - $result = $this->source->getRecordsCount($this->tableName) + $result = $this->source->getRecordsCount($this->temporaryTable->getName()) == $this->destination->getRecordsCount('url_rewrite'); if (!$result) { $this->logger->error('Mismatch of entities in the document: url_rewrite'); @@ -560,7 +582,7 @@ protected function volume() */ protected function getIterationsCount() { - return $this->source->getRecordsCount($this->tableName) + return $this->source->getRecordsCount($this->temporaryTable->getName()) + $this->source->getRecordsCount('catalog_category_entity_url_key') + $this->source->getRecordsCount('catalog_product_entity_url_key'); } @@ -579,7 +601,7 @@ protected function getDuplicatesList() /** @var \Magento\Framework\DB\Select $select */ $select = $adapter->getSelect(); - $select->from(['t' => $this->source->addDocumentPrefix($this->tableName)], ['t.*']) + $select->from(['t' => $this->source->addDocumentPrefix($this->temporaryTable->getName())], ['t.*']) ->join( ['t2' => new \Zend_Db_Expr(sprintf('(%s)', $subSelect->assemble()))], 't2.request_path = t.request_path AND t2.store_id = t.store_id', @@ -591,70 +613,6 @@ protected function getDuplicatesList() return $resultData; } - /** - * Get product suffix query - * - * @codeCoverageIgnore - * @param string $suffixFor Can be 'product' or 'category' - * @param string $mainTable - * @return string - */ - protected function getSuffix($suffixFor, $mainTable = 's') - { - if (empty($this->suffixData[$suffixFor])) { - /** @var \Migration\ResourceModel\Adapter\Mysql $adapter */ - $adapter = $this->source->getAdapter(); - $select = $adapter->getSelect(); - - $select->from( - ['s' => $this->source->addDocumentPrefix('core_store')], - ['store_id' => 's.store_id'] - ); - - $select->joinLeft( - ['c1' => $this->source->addDocumentPrefix('core_config_data')], - "c1.scope='stores' AND c1.path = 'catalog/seo/{$suffixFor}_url_suffix' AND c1.scope_id=s.store_id", - ['store_path' => 'c1.path', 'store_value' => 'c1.value'] - ); - $select->joinLeft( - ['c2' => $this->source->addDocumentPrefix('core_config_data')], - "c2.scope='websites' AND c2.path = 'catalog/seo/{$suffixFor}_url_suffix' AND c2.scope_id=s.website_id", - ['website_path' => 'c2.path', 'website_value' => 'c2.value'] - ); - $select->joinLeft( - ['c3' => $this->source->addDocumentPrefix('core_config_data')], - "c3.scope='default' AND c3.path = 'catalog/seo/{$suffixFor}_url_suffix'", - ['admin_path' => 'c3.path', 'admin_value' => 'c3.value'] - ); - - $result = $select->getAdapter()->fetchAll($select); - foreach ($result as $row) { - $suffix = 'html'; - if ($row['admin_path'] !== null) { - $suffix = $row['admin_value']; - } - if ($row['website_path'] !== null) { - $suffix = $row['website_value']; - } - if ($row['store_path'] !== null) { - $suffix = $row['store_value']; - } - $this->suffixData[$suffixFor][] = [ - 'store_id' => $row['store_id'], - 'suffix' => $suffix ? '.' . $suffix : '' - ]; - } - } - - $suffix = "CASE {$mainTable}.store_id"; - foreach ($this->suffixData[$suffixFor] as $row) { - $suffix .= sprintf(" WHEN '%s' THEN '%s'", $row['store_id'], $row['suffix']); - } - $suffix .= " ELSE '.html' END"; - - return $suffix; - } - /** * Initialize temporary table and insert UrlRewrite data * @@ -666,7 +624,7 @@ protected function initTemporaryTable() { /** @var \Migration\ResourceModel\Adapter\Mysql $adapter */ $adapter = $this->source->getAdapter(); - $this->createTemporaryTable($adapter); + $this->temporaryTable->create(); $this->collectProductRewrites($adapter); $this->collectCategoryRewrites($adapter); $this->collectCmsPageRewrites($adapter); @@ -674,79 +632,6 @@ protected function initTemporaryTable() self::$dataInitialized = true; } - /** - * Crete temporary table - * - * @param \Migration\ResourceModel\Adapter\Mysql $adapter - * @return void - */ - protected function createTemporaryTable(\Migration\ResourceModel\Adapter\Mysql $adapter) - { - $select = $adapter->getSelect(); - $select->getAdapter()->dropTable($this->source->addDocumentPrefix($this->tableName)); - /** @var \Magento\Framework\DB\Ddl\Table $table */ - $table = $select->getAdapter()->newTable($this->source->addDocumentPrefix($this->tableName)) - ->addColumn( - 'id', - \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, - null, - ['identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true] - ) - ->addColumn( - 'request_path', - \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, - 255 - ) - ->addColumn( - 'target_path', - \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, - 255 - ) - ->addColumn( - 'is_system', - \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, - null, - ['nullable' => false, 'default' => '0'] - ) - ->addColumn( - 'store_id', - \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER - ) - ->addColumn( - 'entity_type', - \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, - 32 - ) - ->addColumn( - 'redirect_type', - \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, - null, - ['unsigned' => true, 'nullable' => false, 'default' => '0'] - ) - ->addColumn( - 'product_id', - \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER - ) - ->addColumn( - 'category_id', - \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER - ) - ->addColumn( - 'cms_page_id', - \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER - ) - ->addColumn( - 'priority', - \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER - ) - ->addIndex( - 'url_rewrite', - ['request_path', 'target_path', 'store_id'], - ['type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE] - ) ; - $select->getAdapter()->createTable($table); - } - /** * Fulfill temporary table with category url rewrites * @@ -760,7 +645,7 @@ protected function collectCategoryRewrites(\Migration\ResourceModel\Adapter\Mysq ['r' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], [ 'id' => 'IFNULL(NULL, NULL)', - 'request_path' => sprintf("CONCAT(`r`.`request_path`, %s)", $this->getSuffix('category', 'r')), + 'request_path' => sprintf("CONCAT(`r`.`request_path`, %s)", $this->suffix->getSuffix('category', 'r')), 'target_path' => 'r.target_path', 'is_system' => 'r.is_system', 'store_id' => 'r.store_id', @@ -778,7 +663,7 @@ protected function collectCategoryRewrites(\Migration\ResourceModel\Adapter\Mysq [] ); $query = $select->where('`r`.`entity_type` = 2') - ->insertFromSelect($this->source->addDocumentPrefix($this->tableName)); + ->insertFromSelect($this->source->addDocumentPrefix($this->temporaryTable->getName())); $select->getAdapter()->query($query); } @@ -811,7 +696,7 @@ protected function collectCmsPageRewrites(\Migration\ResourceModel\Adapter\Mysql 'cps.page_id = cp.page_id', [] )->group(['request_path', 'cps.store_id']); - $query = $select->insertFromSelect($this->source->addDocumentPrefix($this->tableName)); + $query = $select->insertFromSelect($this->source->addDocumentPrefix($this->temporaryTable->getName())); $select->getAdapter()->query($query); } @@ -823,203 +708,13 @@ protected function collectCmsPageRewrites(\Migration\ResourceModel\Adapter\Mysql */ protected function collectProductRewrites(\Migration\ResourceModel\Adapter\Mysql $adapter) { - /** @var \Magento\Framework\Db\Select $select */ - $select = $adapter->getSelect(); - $subSelect = $adapter->getSelect(); - $subSelect->from( - ['cr' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], - ['request_path' => 'cr.request_path'] - ); - $subSelect->where('`cr`.`value_id` = `cu`.`value_id`'); - $subSelect->where('`cr`.`entity_type` = 2'); - $subSelect->where('`cr`.`store_id` = s.`store_id`'); - $subConcatCategories = $select->getAdapter()->getConcatSql([ - "($subSelect)", - "'/'", - '`r`.`request_path`', - $this->getSuffix('product') - ]); - $storeSubSelect = $adapter->getSelect(); - $storeSubSelect->from( - ['sr' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], - ['store_id' => 'sr.store_id'] - ); - $storeSubSelect->join( - ['srcu' => $this->source->addDocumentPrefix('catalog_product_entity_url_key')], - 'srcu.value_id = sr.value_id', - [] - ); - $storeSubSelect->where('sr.entity_type = 3') - ->where('srcu.entity_id = p.entity_id') - ->where('sr.store_id > 0'); - - $targetPath = 'IF(ISNULL(c.category_id), r.target_path, CONCAT(r.target_path, "/category/", c.category_id))'; - $select = $adapter->getSelect(); - $select->from( - ['r' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], - [ - 'id' => 'IFNULL(NULL, NULL)', - 'request_path' => $subConcatCategories, - 'target_path' => $targetPath, - 'is_system' => 'r.is_system', - 'store_id' => 's.store_id', - 'entity_type' => "trim('product')", - 'redirect_type' => "trim('0')", - 'product_id' => "p.entity_id", - 'category_id' => "c.category_id", - 'cms_page_id' => "trim('0')", - 'priority' => "trim('4')" - ] - ); - $select->join( - ['p' => $this->source->addDocumentPrefix('catalog_product_entity_url_key')], - 'r.value_id = p.value_id', - [] - ); - $select->join( - ['c' => $this->source->addDocumentPrefix('catalog_category_product')], - 'p.entity_id = c.product_id', - [] - ); - $select->join( - ['cu' => $this->source->addDocumentPrefix('catalog_category_entity_url_key')], - 'cu.entity_id = c.category_id', - [] - ); - $select->join( - ['cpw' => $this->source->addDocumentPrefix('catalog_product_website')], - 'c.product_id = cpw.product_id', - [] - ); - $select->join( - ['s' => $this->source->addDocumentPrefix('core_store')], - sprintf('cpw.website_id = s.website_id and s.store_id not in (%s)', $storeSubSelect), - [] - ); - $select->where('`r`.`entity_type` = 3')->where('`r`.`store_id` = 0'); - - $query = $adapter->getSelect()->from(['result' => new \Zend_Db_Expr("($select)")]) - ->where('result.request_path IS NOT NULL') - ->insertFromSelect($this->source->addDocumentPrefix($this->tableName)) - ; - $select->getAdapter()->query($query); - - $select = $adapter->getSelect(); - $subConcat = $select->getAdapter()->getConcatSql([ - '`r`.`request_path`', - $this->getSuffix('product') - ]); - - $select = $adapter->getSelect(); - $select->from( - ['r' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], - [ - 'id' => 'IFNULL(NULL, NULL)', - 'request_path' => $subConcat, - 'target_path' => 'r.target_path', - 'is_system' => 'r.is_system', - 'store_id' => 's.store_id', - 'entity_type' => "trim('product')", - 'redirect_type' => "trim('0')", - 'product_id' => "p.entity_id", - 'category_id' => "trim('0')", - 'cms_page_id' => "trim('0')", - 'priority' => "trim('4')" - ] - ); - $select->join( - ['p' => $this->source->addDocumentPrefix('catalog_product_entity_url_key')], - 'r.value_id = p.value_id', - [] - ); - $select->join( - ['cpw' => $this->source->addDocumentPrefix('catalog_product_website')], - 'p.entity_id = cpw.product_id', - [] - ); - $select->join( - ['s' => $this->source->addDocumentPrefix('core_store')], - sprintf('cpw.website_id = s.website_id and s.store_id not in (%s)', $storeSubSelect), - [] - ); - $query = $select->where('`r`.`entity_type` = 3') - ->where('`r`.`store_id` = 0') - ->insertFromSelect($this->source->addDocumentPrefix($this->tableName)); - $select->getAdapter()->query($query); - - $select = $adapter->getSelect(); - $subConcatCategories = $select->getAdapter()->getConcatSql([ - "($subSelect)", - "'/'", - '`s`.`request_path`', - $this->getSuffix('product') - ]); - $select->from( - ['s' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], - [ - 'id' => 'IFNULL(NULL, NULL)', - 'request_path' => $subConcatCategories, - 'target_path' => 's.target_path', - 'is_system' => 's.is_system', - 'store_id' => 's.store_id', - 'entity_type' => "trim('product')", - 'redirect_type' => "trim('0')", - 'product_id' => "p.entity_id", - 'category_id' => "c.category_id", - 'cms_page_id' => "trim('0')", - 'priority' => "trim('4')" - ] - ); - $select->join( - ['p' => $this->source->addDocumentPrefix('catalog_product_entity_url_key')], - 's.value_id = p.value_id', - [] - ); - $select->join( - ['c' => $this->source->addDocumentPrefix('catalog_category_product')], - 'p.entity_id = c.product_id', - [] - ); - $select->join( - ['cu' => $this->source->addDocumentPrefix('catalog_category_entity_url_key')], - 'cu.entity_id = c.category_id', - [] - ); - $query = $select->where('`s`.`entity_type` = 3') - ->where('`s`.`store_id` > 0') - ->insertFromSelect($this->source->addDocumentPrefix($this->tableName)); - $select->getAdapter()->query($query); - - $select = $adapter->getSelect(); - $subConcat = $select->getAdapter()->getConcatSql([ - '`s`.`request_path`', - $this->getSuffix('product') - ]); - $select->from( - ['s' => $this->source->addDocumentPrefix('enterprise_url_rewrite')], - [ - 'id' => 'IFNULL(NULL, NULL)', - 'request_path' => $subConcat, - 'target_path' => 's.target_path', - 'is_system' => 's.is_system', - 'store_id' => 's.store_id', - 'entity_type' => "trim('product')", - 'redirect_type' => "trim('0')", - 'product_id' => "p.entity_id", - 'category_id' => "trim('0')", - 'cms_page_id' => "trim('0')", - 'priority' => "trim('4')" - ] - ); - $select->join( - ['p' => $this->source->addDocumentPrefix('catalog_product_entity_url_key')], - 's.value_id = p.value_id', - [] - ); - $query = $select->where('`s`.`entity_type` = 3') - ->where('`s`.`store_id` > 0') - ->insertFromSelect($this->source->addDocumentPrefix($this->tableName)); - $select->getAdapter()->query($query); + $queryExecute = function ($query) use ($adapter) { + $adapter->getSelect()->getAdapter()->query($query); + }; + $queryExecute($this->productRewritesWithoutCategories->getQueryProductsSavedForDefaultScope()); + $queryExecute($this->productRewritesWithoutCategories->getQueryProductsSavedForParticularStoreView()); + $queryExecute($this->productRewritesIncludedIntoCategories->getQueryProductsSavedForDefaultScope()); + $queryExecute($this->productRewritesIncludedIntoCategories->getQueryProductsSavedForParticularStoreView()); } /** @@ -1048,7 +743,7 @@ protected function collectRedirects(\Migration\ResourceModel\Adapter\Mysql $adap ] ); $query = $select->where('`r`.`entity_type` = 1') - ->insertFromSelect($this->source->addDocumentPrefix($this->tableName)); + ->insertFromSelect($this->source->addDocumentPrefix($this->temporaryTable->getName())); $select->getAdapter()->query($query); $select = $adapter->getSelect(); @@ -1068,7 +763,7 @@ protected function collectRedirects(\Migration\ResourceModel\Adapter\Mysql $adap 'priority' => "trim('1')" ] ); - $query = $select->insertFromSelect($this->source->addDocumentPrefix($this->tableName)); + $query = $select->insertFromSelect($this->source->addDocumentPrefix($this->temporaryTable->getName())); $select->getAdapter()->query($query); } diff --git a/tests/integration/resource/ee.url_rewrite_11410/source.sql b/tests/integration/resource/ee.url_rewrite_11410/source.sql index 0fc5a70a8..9f0cac6a1 100644 --- a/tests/integration/resource/ee.url_rewrite_11410/source.sql +++ b/tests/integration/resource/ee.url_rewrite_11410/source.sql @@ -150,10 +150,10 @@ CREATE TABLE `core_config_data` ( LOCK TABLES `core_config_data` WRITE; /*!40000 ALTER TABLE `core_config_data` DISABLE KEYS */; INSERT INTO `core_config_data` VALUES -(1,'default',0,'catalog/seo/product_url_suffix','html'), -(2,'default',0,'catalog/seo/category_url_suffix','html'), -(3,'websites',1,'catalog/seo/product_url_suffix','html1'), -(4,'stores',3,'catalog/seo/product_url_suffix','html2'); +(1,'default',0,'catalog/seo/product_url_suffix','.html'), +(2,'default',0,'catalog/seo/category_url_suffix','.html'), +(3,'websites',1,'catalog/seo/product_url_suffix','.html1'), +(4,'stores',3,'catalog/seo/product_url_suffix','.html2'); /*!40000 ALTER TABLE `core_config_data` ENABLE KEYS */; UNLOCK TABLES; diff --git a/tests/integration/resource/url_rewrite_11410/source.sql b/tests/integration/resource/url_rewrite_11410/source.sql index 0fc5a70a8..9f0cac6a1 100644 --- a/tests/integration/resource/url_rewrite_11410/source.sql +++ b/tests/integration/resource/url_rewrite_11410/source.sql @@ -150,10 +150,10 @@ CREATE TABLE `core_config_data` ( LOCK TABLES `core_config_data` WRITE; /*!40000 ALTER TABLE `core_config_data` DISABLE KEYS */; INSERT INTO `core_config_data` VALUES -(1,'default',0,'catalog/seo/product_url_suffix','html'), -(2,'default',0,'catalog/seo/category_url_suffix','html'), -(3,'websites',1,'catalog/seo/product_url_suffix','html1'), -(4,'stores',3,'catalog/seo/product_url_suffix','html2'); +(1,'default',0,'catalog/seo/product_url_suffix','.html'), +(2,'default',0,'catalog/seo/category_url_suffix','.html'), +(3,'websites',1,'catalog/seo/product_url_suffix','.html1'), +(4,'stores',3,'catalog/seo/product_url_suffix','.html2'); /*!40000 ALTER TABLE `core_config_data` ENABLE KEYS */; UNLOCK TABLES; diff --git a/tests/integration/testsuite/Migration/App/SetupDeltaLogTest.php b/tests/integration/testsuite/Migration/App/SetupDeltaLogTest.php index 77c0e75c2..08033c5be 100644 --- a/tests/integration/testsuite/Migration/App/SetupDeltaLogTest.php +++ b/tests/integration/testsuite/Migration/App/SetupDeltaLogTest.php @@ -12,32 +12,51 @@ class SetupDeltaLogTest extends \PHPUnit_Framework_TestCase { + /** + * @var SetupDeltaLog|\PHPUnit_Framework_MockObject_MockObject + */ + private $setupDeltaLog; + + /** + * @var \Magento\Framework\ObjectManagerInterface + */ + private $objectManager; + + /** + * @var \Migration\ResourceModel\Source + */ + private $source; + /** * @return void */ - public function testSetupTriggers() + public function setUp() { $helper = \Migration\TestFramework\Helper::getInstance(); - $objectManager = $helper->getObjectManager(); - $objectManager->get('\Migration\Config') + $this->objectManager = $helper->getObjectManager(); + $this->objectManager->get('\Migration\Config') ->init(dirname(__DIR__) . '/_files/' . $helper->getFixturePrefix() . 'config.xml'); - /** @var \Migration\ResourceModel\Source $source */ - $source = $objectManager->create('\Migration\ResourceModel\Source'); - /** @var \Migration\App\SetupDeltaLog $setupDeltaLog */ - $setupDeltaLog = $objectManager->create( + $this->setupDeltaLog = $this->objectManager->create( '\Migration\App\SetupDeltaLog' ); + $this->source = $this->objectManager->create('\Migration\ResourceModel\Source'); + } + /** + * @return void + */ + public function testSetupTriggers() + { ob_start(); - $this->assertTrue($setupDeltaLog->perform()); + $this->assertTrue($this->setupDeltaLog->perform()); ob_end_clean(); $dataTable = 'table_with_data'; - $this->checkDeltaLogTable($dataTable, $source); - $this->checkDeltaLogTable('source_table_1', $source); - $this->checkDeltaLogTable('source_table_2', $source); + $this->checkDeltaLogTable($dataTable, $this->source); + $this->checkDeltaLogTable('source_table_1', $this->source); + $this->checkDeltaLogTable('source_table_2', $this->source); - $sourceAdapter = $source->getAdapter(); + $sourceAdapter = $this->source->getAdapter(); $sourceAdapter->insertRecords( $dataTable, [ @@ -74,7 +93,7 @@ public function testSetupTriggers() ['key' => '9', 'operation' => 'INSERT', 'processed' => 0], ['key' => '10', 'operation' => 'INSERT', 'processed' => 0] ]; - $this->assertEquals($expectedData, $source->getRecords($source->getDeltaLogName($dataTable), 0)); + $this->assertEquals($expectedData, $this->source->getRecords($this->source->getDeltaLogName($dataTable), 0)); } /** @@ -88,4 +107,21 @@ protected function checkDeltaLogTable($dataTable, $resource) $deltaLogTable = $resource->getDocument($deltaLogTableName); $this->assertEquals($deltaLogTableName, $deltaLogTable->getName()); } + + /** + * @return void + */ + public function testSetupTriggersFail() + { + $message = [ + \Monolog\Logger::WARNING => ['Some of the delta log tables were not created. Expected:3. Actual:2'] + ]; + /** @var \Magento\Framework\DB\Adapter\Pdo\Mysql $adapter */ + $adapter = $this->source->getAdapter()->getSelect()->getAdapter(); + $adapter->dropTable('source_table_1'); + ob_start(); + $this->assertTrue($this->setupDeltaLog->perform()); + ob_end_clean(); + $this->assertEquals($message, \Migration\Logger\Logger::getMessages()); + } } diff --git a/tests/unit/testsuite/Migration/App/SetupDeltaLogTest.php b/tests/unit/testsuite/Migration/App/SetupDeltaLogTest.php index f315ae87d..917aed81a 100644 --- a/tests/unit/testsuite/Migration/App/SetupDeltaLogTest.php +++ b/tests/unit/testsuite/Migration/App/SetupDeltaLogTest.php @@ -60,7 +60,10 @@ public function testPerform() $progress->expects($this->once()) ->method('finish'); - $deltaLog = new SetupDeltaLog($source, $groupsFactory, $progress); + /** @var \Migration\Logger\Logger|\PHPUnit_Framework_MockObject_MockObject $logger */ + $logger = $this->getMock('\Migration\Logger\Logger', [], [], '', false); + + $deltaLog = new SetupDeltaLog($source, $groupsFactory, $progress, $logger); $this->assertTrue($deltaLog->perform()); } } diff --git a/tests/unit/testsuite/Migration/ResourceModel/RecordTest.php b/tests/unit/testsuite/Migration/ResourceModel/RecordTest.php index fb88165ef..946fa1487 100644 --- a/tests/unit/testsuite/Migration/ResourceModel/RecordTest.php +++ b/tests/unit/testsuite/Migration/ResourceModel/RecordTest.php @@ -150,6 +150,21 @@ public function testGetData() $this->assertEquals(['id' => 10, 'name' => 'item1'], $this->record->getData()); } + /** + * @return void + */ + public function testGetDataDefault() + { + $structureData = [ + 'id' => ['NULLABLE' => true, 'DEFAULT' => 10], + 'sku' => ['NULLABLE' => true, 'DEFAULT' => 'item1'], + 'name' => ['NULLABLE' => true, 'DEFAULT' => null] + ]; + $fieldsDefault = ['id' => 10, 'sku' => 'item1', 'name' => '']; + $this->structure->expects($this->any())->method('getFields')->willReturn($structureData); + $this->assertEquals($fieldsDefault, $this->record->getDataDefault()); + } + /** * @return array */ diff --git a/tests/unit/testsuite/Migration/Step/Customer/HelperTest.php b/tests/unit/testsuite/Migration/Step/Customer/HelperTest.php deleted file mode 100644 index 534bf96f7..000000000 --- a/tests/unit/testsuite/Migration/Step/Customer/HelperTest.php +++ /dev/null @@ -1,397 +0,0 @@ -sourceAdapter = $this->getMockBuilder(\Migration\ResourceModel\Adapter\Mysql::class) - ->disableOriginalConstructor() - ->setMethods(['fetchAll', 'getSelect']) - ->getMock(); - $this->destAdapter = $this->getMockBuilder(\Migration\ResourceModel\Adapter\Mysql::class) - ->disableOriginalConstructor() - ->setMethods(['getDocumentStructure']) - ->getMock(); - - $this->select = $this->getMockBuilder('Magento\Framework\DB\Select') - ->setMethods(['from', 'join', 'where', 'union', 'getAdapter']) - ->disableOriginalConstructor() - ->getMock(); - $this->select->expects($this->any())->method('from')->willReturnSelf(); - $this->select->expects($this->any())->method('join')->willReturnSelf(); - $this->select->expects($this->any())->method('where')->willReturnSelf(); - $this->select->expects($this->any())->method('union')->willReturnSelf(); - $this->select->expects($this->any())->method('getAdapter')->willReturn($this->sourceAdapter); - $this->sourceAdapter->expects($this->any())->method('getSelect')->willReturn($this->select); - - $this->source = $this->getMockBuilder(\Migration\ResourceModel\Source::class) - ->disableOriginalConstructor() - ->setMethods(['getAdapter', 'addDocumentPrefix']) - ->getMock(); - $this->source->expects($this->any())->method('getAdapter')->willReturn($this->sourceAdapter); - $this->source->expects($this->any())->method('addDocumentPrefix')->willReturnArgument(0); - - $this->destination = $this->getMockBuilder(\Migration\ResourceModel\Destination::class) - ->disableOriginalConstructor() - ->setMethods(['getAdapter']) - ->getMock(); - $this->destination->expects($this->any())->method('getAdapter')->willReturn($this->destAdapter); - - $this->configReader = $this->getMockBuilder(\Migration\Config::class) - ->disableOriginalConstructor() - ->getMock(); - - $this->readerAttributes = $this->getMockBuilder(\Migration\Reader\Groups::class) - ->disableOriginalConstructor() - ->getMock(); - - $this->readerGroups = $this->getMockBuilder(\Migration\Reader\Groups::class) - ->setMethods(['getGroup']) - ->disableOriginalConstructor() - ->getMock(); - $this->readerGroups->expects($this->at(0)) - ->method('getGroup') - ->with('source_documents') - ->willReturn([ - 'customer_entity' => 'entity_id', - 'customer_address_entity' => 'entity_id' - ]); - - $groupsFactory = $this->getMockBuilder(\Migration\Reader\GroupsFactory::class) - ->setMethods(['create']) - ->disableOriginalConstructor() - ->getMock(); - $groupsFactory->expects($this->at(0)) - ->method('create') - ->with('customer_attribute_groups_file') - ->willReturn($this->readerAttributes); - $groupsFactory->expects($this->at(1)) - ->method('create') - ->with('customer_document_groups_file') - ->willReturn($this->readerGroups); - - $this->helper = $this->getMockBuilder(Helper::class) - ->setConstructorArgs([$this->source, $this->destination, $groupsFactory, $this->configReader]) - ->setMethods(['getAttributesData']) - ->getMock(); - } - - /** - * @param array $testMethodArguments - * @param array $recordsData - * @param array $attributesValues - * @param array $upgradePasswordHash - * @param array $recordsResult - * - * @dataProvider fixturesDataProvider - * @return void - */ - public function testUpdateAttributeData( - $testMethodArguments, - $recordsData, - $attributesValues, - $upgradePasswordHash, - $recordsResult - ) { - $records = []; - foreach ($recordsData as $recordData) { - $records[] = $this->getMockBuilder(Record::class) - ->setConstructorArgs([$recordData]) - ->setMethods(null) - ->getMock(); - } - $structure = $this->getMockBuilder(Structure::class) - ->disableOriginalConstructor() - ->getMock(); - $destinationRecords = new Collection($structure, $records); - - $this->initMaps(); - - $this->sourceAdapter - ->expects($this->once()) - ->method('fetchAll') - ->with($this->select) - ->willReturn($attributesValues); - - $this->configReader - ->expects($this->any()) - ->method('getOption') - ->willReturnMap([$upgradePasswordHash]); - - $this->helper->updateAttributeData( - $testMethodArguments['entityTypeCode'], - $testMethodArguments['sourceDocName'], - $testMethodArguments['destinationDocName'], - $destinationRecords - ); - - foreach ($destinationRecords as $key => $record) { - $this->assertEquals($record->getData(), $recordsResult[$key]); - } - } - - /** - * Initializes Mocks return maps - * - * @return void - */ - private function initMaps() - { - $this->helper - ->expects($this->any()) - ->method('getAttributesData') - ->willReturnMap([ - [ - 'customer', - [ - 'password_hash' => [ - 'attribute_id' => '12', - 'backend_type' => 'varchar', - 'attribute_code' => 'password_hash', - 'entity_type_id' => '1' - ], - ] - ], [ - 'customer_address', - [ - 'company' => [ - 'attribute_id' => '13', - 'backend_type' => 'varchar', - 'attribute_code' => 'company', - 'entity_type_id' => '2' - ], - 'country_id' => [ - 'attribute_id' => '14', - 'backend_type' => 'varchar', - 'attribute_code' => 'country_id', - 'entity_type_id' => '2' - ], - ] - ] - ]); - $this->readerAttributes - ->expects($this->any()) - ->method('getGroup') - ->willReturnMap([ - ['customer_entity', ['entity_id' => '', 'entity_type_id' => '', 'email' => '', 'password_hash' => '']], - ['customer_address_entity', ['entity_id' => '', 'city' => '', 'company' => '', 'country_id' => '']] - ]); - $this->destAdapter - ->expects($this->any()) - ->method('getDocumentStructure') - ->willReturnMap([ - [ - 'customer_entity', - [ - 'entity_id' => ['DEFAULT' => null, 'NULLABLE' => false], - 'entity_type_id' => ['DEFAULT' => null, 'NULLABLE' => false], - 'email' => ['DEFAULT' => null, 'NULLABLE' => true], - 'password_hash' => ['DEFAULT' => null, 'NULLABLE' => false], - ] - ], [ - 'customer_address_entity', - [ - 'entity_id' => ['DEFAULT' => null, 'NULLABLE' => false], - 'city' => ['DEFAULT' => null, 'NULLABLE' => false], - 'company' => ['DEFAULT' => null, 'NULLABLE' => true], - 'country_id' => ['DEFAULT' => null, 'NULLABLE' => false], - ] - ] - ]); - } - - /** - * @return array - */ - public function fixturesDataProvider() - { - return [ - [ - 'testMethodArguments' => [ - 'entityTypeCode' => 'customer', - 'sourceDocName' => 'customer_entity', - 'destinationDocName' => 'customer_entity' - ], - 'recordsData' => [ - ['entity_id' => '1', 'entity_type_id' => '1', 'email' => 'customer1@example.com'], - ['entity_id' => '2', 'entity_type_id' => '1', 'email' => 'customer2@example.com'], - ['entity_id' => '3', 'entity_type_id' => '1', 'email' => 'customer3@example.com'], - ['entity_id' => '4', 'entity_type_id' => '1', 'email' => 'customer4@example.com'] - ], - 'attributesValues' => [ - [ - 'entity_id' => '1', - 'attribute_id' => '12', - 'value' => '34356a3d028accfb3c2996827b706bf5:UmPvGtih25eQCjC5f6NMwqkds500x2Jd' - ], [ - 'entity_id' => '2', - 'attribute_id' => '12', - 'value' => '86a375aacb17606c185d31c8d3e320ce' - ], [ - 'entity_id' => '3', - 'attribute_id' => '12', - 'value' => 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' - ], [ - 'entity_id' => '4', - 'attribute_id' => '12', - 'value' => '123123q:UmPvGtih25eQCjC5f6NMwqkds500x2Jd' - ] - ], - 'upgradePasswordHash' => [Helper::UPGRADE_CUSTOMER_PASSWORD_HASH, true], - 'recordsResult' => [ - [ - 'entity_id' => '1', - 'entity_type_id' => '1', - 'email' => 'customer1@example.com', - 'password_hash' => '34356a3d028accfb3c2996827b706bf5:UmPvGtih25eQCjC5f6NMwqkds500x2Jd:0' - ], [ - 'entity_id' => '2', - 'entity_type_id' => '1', - 'email' => 'customer2@example.com', - 'password_hash' => '86a375aacb17606c185d31c8d3e320ce::0' - ], [ - 'entity_id' => '3', - 'entity_type_id' => '1', - 'email' => 'customer3@example.com', - 'password_hash' => 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855::1' - ], [ - 'entity_id' => '4', - 'entity_type_id' => '1', - 'email' => 'customer4@example.com', - 'password_hash' => '123123q:UmPvGtih25eQCjC5f6NMwqkds500x2Jd' - ] - ], - ], [ - 'testMethodArguments' => [ - 'entityTypeCode' => 'customer', - 'sourceDocName' => 'customer_entity', - 'destinationDocName' => 'customer_entity' - ], - 'recordsData' => [ - ['entity_id' => '1', 'entity_type_id' => '1', 'email' => 'customer1@example.com'], - ['entity_id' => '2', 'entity_type_id' => '1', 'email' => 'customer2@example.com'] - ], - 'attributesValues' => [ - [ - 'entity_id' => '1', - 'attribute_id' => '12', - 'value' => '34356a3d028accfb3c2996827b706bf5:UmPvGtih25eQCjC5f6NMwqkds500x2Jd' - ], - [ - 'entity_id' => '2', - 'attribute_id' => '12', - 'value' => '123123q:UmPvGtih25eQCjC5f6NMwqkds500x2Jd' - ] - ], - 'upgradePasswordHash' => [Helper::UPGRADE_CUSTOMER_PASSWORD_HASH, false], - 'recordsResult' => [ - [ - 'entity_id' => '1', - 'entity_type_id' => '1', - 'email' => 'customer1@example.com', - 'password_hash' => '34356a3d028accfb3c2996827b706bf5:UmPvGtih25eQCjC5f6NMwqkds500x2Jd' - ], - [ - 'entity_id' => '2', - 'entity_type_id' => '1', - 'email' => 'customer2@example.com', - 'password_hash' => '123123q:UmPvGtih25eQCjC5f6NMwqkds500x2Jd' - ] - ], - ], [ - 'testMethodArguments' => [ - 'entityTypeCode' => 'customer_address', - 'sourceDocName' => 'customer_address_entity', - 'destinationDocName' => 'customer_address_entity' - ], - 'recordsData' => [ - ['entity_id' => '1', 'city' => 'Austin'], - ['entity_id' => '2', 'city' => 'Kiev'] - ], - 'attributesValues' => [ - [ - 'entity_id' => '1', - 'attribute_id' => '13', - 'value' => 'Company Name' - ] - ], - 'upgradePasswordHash' => [Helper::UPGRADE_CUSTOMER_PASSWORD_HASH, false], - 'recordsResult' => [ - [ - 'entity_id' => '1', - 'city' => 'Austin', - 'company' => 'Company Name', - 'country_id' => '' - ], [ - 'entity_id' => '2', - 'city' => 'Kiev', - 'company' => null, - 'country_id' => '' - ] - ], - ] - ]; - } -} diff --git a/tests/unit/testsuite/Migration/Step/UrlRewrite/Version11410to2000Test.php b/tests/unit/testsuite/Migration/Step/UrlRewrite/Version11410to2000Test.php index cbd204216..173d1bc81 100644 --- a/tests/unit/testsuite/Migration/Step/UrlRewrite/Version11410to2000Test.php +++ b/tests/unit/testsuite/Migration/Step/UrlRewrite/Version11410to2000Test.php @@ -5,8 +5,11 @@ */ namespace Migration\Step\UrlRewrite; +use Migration\Step\UrlRewrite\Model\Version11410to2000; + /** * Class UrlRewriteTest + * @SuppressWarnings(PHPMD) */ class Version11410to2000Test extends \PHPUnit_Framework_TestCase { @@ -55,6 +58,26 @@ class Version11410to2000Test extends \PHPUnit_Framework_TestCase */ protected $helper; + /** + * @var ProductRewritesWithoutCategories|\PHPUnit_Framework_MockObject_MockObject + */ + protected $productRewritesWithoutCategories; + + /** + * @var ProductRewritesIncludedIntoCategories|\PHPUnit_Framework_MockObject_MockObject + */ + protected $productRewritesIncludedIntoCategories; + + /** + * @var Suffix|\PHPUnit_Framework_MockObject_MockObject + */ + protected $suffix; + + /** + * @var TemporaryTable|\PHPUnit_Framework_MockObject_MockObject + */ + protected $temporaryTable; + /** * @return void */ @@ -84,6 +107,22 @@ public function setUp() ); $this->recordFactory = $this->getMock('\Migration\ResourceModel\RecordFactory', ['create'], [], '', false); $this->helper = $this->getMock('\Migration\Step\UrlRewrite\Helper', [], ['processFields'], '', false); + $this->productRewritesWithoutCategories = $this->getMock( + '\Migration\Step\UrlRewrite\Model\Version11410to2000\ProductRewritesWithoutCategories', + [], + [], + '', + false + ); + $this->productRewritesIncludedIntoCategories = $this->getMock( + '\Migration\Step\UrlRewrite\Model\Version11410to2000\ProductRewritesIncludedIntoCategories', + [], + [], + '', + false + ); + $this->suffix = $this->getMock('\Migration\Step\UrlRewrite\Model\Suffix', [], [], '', false); + $this->temporaryTable = $this->getMock('\Migration\Step\UrlRewrite\Model\TemporaryTable', [], [], '', false); } /** @@ -103,6 +142,10 @@ public function testIntegrity() $this->recordCollectionFactory, $this->recordFactory, $this->helper, + $this->productRewritesWithoutCategories, + $this->productRewritesIncludedIntoCategories, + $this->suffix, + $this->temporaryTable, 'integrity' ); }