X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fmysqlschema.php;h=435ba4e3a95f57f3ca0ba314db4fb483d0ca0b83;hb=d81b25729005973e6daa27fc787a042f05a12c94;hp=c3d3501c74cff52f6018cc73ac8120be65970a75;hpb=f9b2feb7f563663d6b564a3cb9223b7c1ea5ecef;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