Comments - Problem with ALTER TABLE and ADD CONSTRAINT
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
This appears to be a phpMyAdmin error (and the issue has been an open bug since 2017), so I suggest using an alternative client.
Thank you. I had begun to wonder whether phpMyAdmin might be the problem as I had subsequently succeeded with the same command using MySQL in the terminal.