moduleDataSetup = $moduleDataSetup; $this->customerSetupFactory = $customerSetupFactory; } /** * {@inheritdoc} */ public function apply() { $this->moduleDataSetup->getConnection()->delete( $this->moduleDataSetup->getTable('customer_form_attribute'), ['form_code = ?' => 'checkout_register'] ); $customerSetup = $this->customerSetupFactory->create(['setup' => $this->moduleDataSetup]); $customerSetup->updateEntityType( \Magento\Customer\Model\Customer::ENTITY, 'entity_model', \Magento\Customer\Model\ResourceModel\Customer::class ); $customerSetup->updateEntityType( \Magento\Customer\Model\Customer::ENTITY, 'increment_model', \Magento\Eav\Model\Entity\Increment\NumericValue::class ); $customerSetup->updateEntityType( \Magento\Customer\Model\Customer::ENTITY, 'entity_attribute_collection', \Magento\Customer\Model\ResourceModel\Attribute\Collection::class ); $customerSetup->updateEntityType( 'customer_address', 'entity_model', \Magento\Customer\Model\ResourceModel\Address::class ); $customerSetup->updateEntityType( 'customer_address', 'entity_attribute_collection', \Magento\Customer\Model\ResourceModel\Address\Attribute\Collection::class ); $customerSetup->updateAttribute( 'customer_address', 'country_id', 'source_model', \Magento\Customer\Model\ResourceModel\Address\Attribute\Source\Country::class ); $customerSetup->updateAttribute( 'customer_address', 'region', 'backend_model', \Magento\Customer\Model\ResourceModel\Address\Attribute\Backend\Region::class ); $customerSetup->updateAttribute( 'customer_address', 'region_id', 'source_model', \Magento\Customer\Model\ResourceModel\Address\Attribute\Source\Region::class ); } /** * {@inheritdoc} */ public static function getDependencies() { return [ UpgradePasswordHashAndAddress::class, ]; } /** * {@inheritdoc} */ public static function getVersion() { return '2.0.6'; } /** * {@inheritdoc} */ public function getAliases() { return []; } }