• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/location/migration/migrate.php
  • Класс: BitrixSaleLocationMigrationCUpdaterLocationPro
  • Вызов: CUpdaterLocationPro::resetLegacyPath
public function resetLegacyPath()
{
	Helper::dropTable(self::TABLE_LEGACY_RELATIONS);

	$dbConnection = BitrixMainHttpApplication::getConnection();
	$dbConnection->query("create table ".self::TABLE_LEGACY_RELATIONS." (
		ID ".Helper::getSqlForDataType('int').",
		COUNTRY_ID ".Helper::getSqlForDataType('int').",
		REGION_ID ".Helper::getSqlForDataType('int').",
		CITY_ID ".Helper::getSqlForDataType('int')."
	)");

	$dbConnection->query("insert into ".self::TABLE_LEGACY_RELATIONS." (ID, COUNTRY_ID, REGION_ID, CITY_ID) select ID, COUNTRY_ID, REGION_ID, CITY_ID from b_sale_location");

	LocationLocationTable::resetLegacyPath();
}