• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/location/import/import.php
  • Класс: BitrixSaleLocationImportis
  • Вызов: is::dropIndexByName
protected function dropIndexByName($indexName, $tableName)
{
	$indexName = $this->dbHelper->forSql(trim($indexName));
	$tableName = $this->dbHelper->forSql(trim($tableName));

	if(!strlen($indexName) || !strlen($tableName))
		return false;

	if(!$this->checkIndexExistsByName($indexName, $tableName))
		return false;

	if($this->dbConnType == self::DB_TYPE_MYSQL)
		$this->dbConnection->query("alter table {$tableName} drop index {$indexName}");
	elseif($this->dbConnType == self::DB_TYPE_ORACLE)
		$this->dbConnection->query("drop index {$indexName}");
	elseif($this->dbConnType == self::DB_TYPE_MSSQL)
		$this->dbConnection->query("drop index {$indexName} on {$tableName}");

	return true;
}