mirror of
https://github.com/silverstripe/silverstripe-postgresql
synced 2024-10-22 17:05:45 +02:00
Remove dead code
This commit is contained in:
parent
f83fa173d9
commit
db2d4574d8
@ -239,11 +239,11 @@ class PostgreSQLSchemaManager extends DBSchemaManager
|
||||
$tableSpace = '';
|
||||
}
|
||||
|
||||
$this->query("CREATE TABLE \"$table\" (
|
||||
$fieldSchemas
|
||||
$fulltexts
|
||||
primary key (\"ID\")
|
||||
)$tableSpace; $indexSchemas $addOptions");
|
||||
$this->query("CREATE TABLE \"$table\" (
|
||||
$fieldSchemas
|
||||
$fulltexts
|
||||
primary key (\"ID\")
|
||||
)$tableSpace; $indexSchemas $addOptions");
|
||||
|
||||
if ($triggers!='') {
|
||||
$this->query($triggers);
|
||||
@ -717,37 +717,7 @@ class PostgreSQLSchemaManager extends DBSchemaManager
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* @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)
|
||||
protected function getIndexSqlDefinition($tableName, $indexName, $indexSpec)
|
||||
{
|
||||
|
||||
//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.
|
||||
//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
|
||||
$tableCol = $this->buildPostgresIndexName($tableName, $indexName);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user