forked from GNUsocial/gnu-social
[SCHEMA] Fix a few mistakes
This commit is contained in:
@@ -363,28 +363,6 @@ class MysqlSchema extends Schema
|
||||
return 'InnoDB';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the unique index key name for a given column on this table
|
||||
* @param $tableName
|
||||
* @param $columnName
|
||||
* @return string
|
||||
*/
|
||||
public function _uniqueKey($tableName, $columnName)
|
||||
{
|
||||
return $this->_key($tableName, $columnName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the index key name for a given column on this table
|
||||
* @param $tableName
|
||||
* @param $columnName
|
||||
* @return string
|
||||
*/
|
||||
public function _key($tableName, $columnName)
|
||||
{
|
||||
return "{$tableName}_{$columnName}_idx";
|
||||
}
|
||||
|
||||
/**
|
||||
* Append phrase(s) to an array of partial ALTER TABLE chunks in order
|
||||
* to alter the given column from its old state to a new one.
|
||||
@@ -427,6 +405,11 @@ class MysqlSchema extends Schema
|
||||
$phrase[] = 'DROP INDEX ' . $keyName;
|
||||
}
|
||||
|
||||
public function appendAlterDropForeign(array &$phrase, $keyName)
|
||||
{
|
||||
$phrase[] = 'DROP FOREIGN KEY ' . $keyName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Throw some table metadata onto the ALTER TABLE if we have a mismatch
|
||||
* in expected type, collation.
|
||||
|
Reference in New Issue
Block a user