<p></p>
<p>The recommended My SQL quires for database schema change during Kamailio upgrading from v.5.3 to 5.4 fails:</p>
<pre><code>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
</code></pre>
<p>The correct command is:</p>
<pre><code>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)
</code></pre>
<p>In this case the second recommended command</p>
<pre><code>ALTER TABLE version ADD PRIMARY KEY (`id`);
</code></pre>
<p>is not needed.</p>
<p>Tested on Ubuntu 18.04, with mysql v.5.7.31</p>
<p>Best regards,<br>
Leonid Fainshtein</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2424">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZN64PGBKOYKYREXKFTR6VJSXANCNFSM4PSQPGGQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZKW25F4CUCPYD4QHJLR6VJSXA5CNFSM4PSQPGG2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4KAH4LBQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2424",
"url": "https://github.com/kamailio/kamailio/issues/2424",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>