The recommended My SQL quires for database schema change during Kamailio upgrading from v.5.3 to 5.4 fails:

mysql> ALTER TABLE version ADD COLUMN `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT;
ERROR 1075 (42000): Incorrect table definition; there can be only one auto column and it must be defined as a key

The correct command is:

mysql> ALTER TABLE `version` ADD COLUMN `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, ADD PRIMARY KEY (`id`);
Query OK, 0 rows affected (0.80 sec)

In this case the second recommended command

ALTER TABLE version ADD PRIMARY KEY (`id`);

is not needed.

Tested on Ubuntu 18.04, with mysql v.5.7.31

Best regards,
Leonid Fainshtein


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.