mirror of
https://github.com/silverstripe/silverstripe-postgresql
synced 2024-10-22 15:05:45 +00:00
Remove dead code
This commit is contained in:
parent
f83fa173d9
commit
db2d4574d8
@ -717,37 +717,7 @@ class PostgreSQLSchemaManager extends DBSchemaManager
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
protected function getIndexSqlDefinition($tableName, $indexName, $indexSpec)
|
||||||
* @todo - factor out? Is DBSchemaManager::convertIndexSpec sufficient?
|
|
||||||
public function convertIndexSpec($indexSpec, $asDbValue=false, $table=''){
|
|
||||||
|
|
||||||
if(!$asDbValue){
|
|
||||||
if(is_array($indexSpec)){
|
|
||||||
//Here we create a db-specific version of whatever index we need to create.
|
|
||||||
switch($indexSpec['type']){
|
|
||||||
case 'fulltext':
|
|
||||||
$indexSpec='fulltext (' . $indexSpec['value'] . ')';
|
|
||||||
break;
|
|
||||||
case 'unique':
|
|
||||||
$indexSpec='unique (' . $indexSpec['value'] . ')';
|
|
||||||
break;
|
|
||||||
case 'hash':
|
|
||||||
$indexSpec='using hash (' . $indexSpec['value'] . ')';
|
|
||||||
break;
|
|
||||||
case 'index':
|
|
||||||
//The default index is 'btree', which we'll use by default (below):
|
|
||||||
default:
|
|
||||||
$indexSpec='using btree (' . $indexSpec['value'] . ')';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$indexSpec = $this->buildPostgresIndexName($table, $indexSpec);
|
|
||||||
}
|
|
||||||
return $indexSpec;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
protected function getIndexSqlDefinition($tableName, $indexName, $indexSpec, $asDbValue=false)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
//TODO: create table partition support
|
//TODO: create table partition support
|
||||||
@ -757,12 +727,6 @@ class PostgreSQLSchemaManager extends DBSchemaManager
|
|||||||
//Therefore, we now check for the existance of indexes before we create them.
|
//Therefore, we now check for the existance of indexes before we create them.
|
||||||
//This is techically a bug, since new tables will not be indexed.
|
//This is techically a bug, since new tables will not be indexed.
|
||||||
|
|
||||||
// If requesting the definition rather than the DDL
|
|
||||||
if ($asDbValue) {
|
|
||||||
$indexName=trim($indexName, '()');
|
|
||||||
return $indexName;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Determine index name
|
// Determine index name
|
||||||
$tableCol = $this->buildPostgresIndexName($tableName, $indexName);
|
$tableCol = $this->buildPostgresIndexName($tableName, $indexName);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user