[SCHEMA] Fix a few mistakes

This commit is contained in:
Alexei Sorokin
2020-07-31 18:24:12 +03:00
parent 96eced9845
commit 1870f38099
3 changed files with 11 additions and 27 deletions

View File

@@ -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.