title: Concrete5 database index specified in db.xml but doesn't "take". How do I make it work?
body: <p>Environment: Windows7, IIS7, MySQL 5.1.57, Concrete5 5.4.1.1</p>
  
  <p>I'm getting this rather odd error message when I place my custom block:</p>
  
  <pre><code>Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysql error: [-1: No primary key found for table btCtL] in BlockRecord::UpdateActiveTable(0, 0) ' in C:\inetpub\wwwroot\Concrete5\concrete\libraries\3rdparty\adodb\adodb-exceptions.inc.php:78 Stack trace: #0 
  C:\inetpub\wwwroot\Concrete5\concrete\libraries\3rdparty\adodb\adodb-active-record.inc.php(494): adodb_throw('mysql', 'BlockRecord::Up...', -1, 'No primary key ...', 0, 0, Object(ADODB_mysql)) #1 
  C:\inetpub\wwwroot\Concrete5\concrete\libraries\3rdparty\adodb\adodb-active-record.inc.php(402): ADODB_Active_Record-&gt;Error('No primary key ...', 'UpdateActiveTab...') #2 
  C:\inetpub\wwwroot\Concrete5\concrete\libraries\3rdparty\adodb\adodb-active-record.inc.php(136): ADODB_Active_Record-&gt;UpdateActiveTable(false) #3 
  C:\inetpub\wwwroot\Concrete5\concrete\libraries\block_view.php(30): ADODB_Active_Record-&gt;__construct('btCtL') #4 
  C:\inetpub\wwwroot\Concrete5\concrete\libraries\block_controller.php(222): BlockRecord-&gt;__construct('btCtL') #5 
  C:\inetpub\wwwroot\Concrete in C:\inetpub\wwwroot\Concrete5\concrete\libraries\3rdparty\adodb\adodb-exceptions.inc.php on line 78 
  </code></pre>
  
  <p>The db.xml in this case reads</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;schema version="0.3"&gt;
  &lt;table name="btCtL"&gt;
      &lt;field name="bID" type="I"&gt;
      &lt;unsigned /&gt;
      &lt;key /&gt;      
      &lt;/field&gt;
      &lt;field name="Number_1" type="C" size="12"&gt;&lt;/field&gt;
      &lt;field name="Number_2" type="C" size="12"&gt;&lt;/field&gt;
      &lt;field name="Number_3" type="C" size="12"&gt;&lt;/field&gt;
      &lt;field name="Number_4" type="C" size="12"&gt;&lt;/field&gt;
      &lt;field name="Number_5" type="C" size="12"&gt;&lt;/field&gt;
      &lt;field name="Number_6" type="C" size="12"&gt;&lt;/field&gt;
      &lt;field name="Number_7" type="C" size="12"&gt;&lt;/field&gt;
      &lt;field name="Number_8" type="C" size="12"&gt;&lt;/field&gt;
      &lt;field name="Number_9" type="C" size="12"&gt;&lt;/field&gt;
      &lt;field name="Number_10" type="C" size="12"&gt;&lt;/field&gt;
  &lt;/table&gt;
  &lt;/schema&gt;
  </code></pre>
  
  <p>The error has to do with there being "No primary key found for table btCtL" which is demonstrably false. If I go into phpAdmin and force the issue, it works, but I can't be doing that for every client site, nor can I expect clients to do it themselves.</p>
  
  <p>Is this a bug? Is there a workaround? Or am I just thick?</p>