Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #27062


Ignore:
Timestamp:
02/08/2014 04:51:57 AM (11 years ago)
Author:
SergeyBiryukov
Comment:

Related: #10404, #10693.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27062 – Description

    initial v1  
    22
    33The attached minimalist code demonstrates the problem. The plugin creates the table fine, on reactivation the following error results:
    4 
     4{{{
    55<div id='error'>
    6                         <p class='wpdberror'><strong>WordPress database error:</strong> [Multiple primary key defined]<br />
    7                         <code>ALTER TABLE testsite_minimalist ADD PRIMARY KEY  id (id)</code></p>
    8                         </div>
    9 
     6        <p class='wpdberror'><strong>WordPress database error:</strong> [Multiple primary key defined]<br />
     7        <code>ALTER TABLE testsite_minimalist ADD PRIMARY KEY  id (id)</code></p>
     8</div>
     9}}}
    1010Expected result is no error: dbDelta should not try to define the primary key a second time (or should drop the primary key before attempting to alter the table).