title: SQLite multi-Primary Key on a Table, one of them is Auto Increment
body: <p>I have multiple (composite) primary keys on a table and one of them will be auto increment. However, interestingly SQLite allows usage of <code>AUTOINCREMENT</code> keyword just after an obligatory <code>PRIMARY KEY</code> keyword.</p>
  
  <p>My query is:</p>
  
  <pre><code>CREATE TABLE ticket (
       id INTEGER PRIMARY KEY AUTOINCREMENT,
       seat TEXT, payment INTEGER,
       PRIMARY KEY (id, seat))
  </code></pre>
  
  <p>However the error is <code>table "ticket" has more than one primary key</code>.</p>
  
  <p>Actually I can avoid other primary keys for this table. But I am coding an ORM framework (hell yeah I'm crazy) and do not want to change structure of <code>PRIMARY KEY</code> constraint generation for a table (because it is allowed in MySQL afaik).</p>
  
  <p>Any solutions to this?</p>