X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fmysqlschema.php;h=435ba4e3a95f57f3ca0ba314db4fb483d0ca0b83;hb=9143d4f38493da81328317100b34a37dd67fde54;hp=c3d3501c74cff52f6018cc73ac8120be65970a75;hpb=9948523c33ea0d02681ff1e0cd4fcb839dc9df96;p=quix0rs-gnu-social.git diff --git a/lib/mysqlschema.php b/lib/mysqlschema.php index c3d3501c74..435ba4e3a9 100644 --- a/lib/mysqlschema.php +++ b/lib/mysqlschema.php @@ -298,6 +298,16 @@ class MysqlSchema extends Schema return "{$tableName}_{$columnName}_idx"; } + /** + * MySQL doesn't take 'DROP CONSTRAINT', need to treat primary keys as + * if they were indexes here, but can use 'PRIMARY KEY' special name. + * + * @param array $phrase + */ + function appendAlterDropPrimary(array &$phrase) + { + $phrase[] = 'DROP PRIMARY KEY'; + } /** * MySQL doesn't take 'DROP CONSTRAINT', need to treat unique keys as