title: org.h2.jdbc.JdbcSQLException: Column "ID" not found
body: <p>I have the following DDL in my code:</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS SOMETABLE (
    id BIGINT AUTO_INCREMENT NOT NULL,
    ...
    FOREIGN KEY (id) REFERENCES OTHERTABLE(id)
    ...
  );
  </code></pre>
  
  <p>Here's the definition of OTHERTABLE:</p>
  
  <pre><code>create table "OTHERTABLE" (
    "id" BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,
    "code" VARCHAR NOT NULL,
    "name" VARCHAR NOT NULL,
    "enabled" BOOLEAN NOT NULL,
    "app_id" VARCHAR NOT NULL);
  </code></pre>
  
  <p>Please note that OTHERTABLE is auto generated by SLICK (Scala ORM Stack)!</p>
  
  <p>This works with MySQL (which is our dev/prod database), however, our unit tests use H2 database, and executing this gives the following stack trace:</p>
  
  <pre><code>org.h2.jdbc.JdbcSQLException: Column "ID" not found
  at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
  at org.h2.message.DbException.get(DbException.java:169)
  at org.h2.message.DbException.get(DbException.java:146)
  at org.h2.table.Table.getColumn(Table.java:613)
  at org.h2.table.IndexColumn.mapColumns(IndexColumn.java:75)
  at org.h2.command.ddl.AlterTableAddConstraint.tryUpdate(AlterTableAddConstraint.java:203)
  at org.h2.command.ddl.AlterTableAddConstraint.update(AlterTableAddConstraint.java:70)
  at org.h2.command.ddl.CreateTable.update(CreateTable.java:169)
  at org.h2.command.CommandContainer.update(CommandContainer.java:79)
  at org.h2.command.Command.executeUpdate(Command.java:235)
  </code></pre>
  
  <p>There is a way out of this, and that is to change id to "id" in all the places, but this changes breaks in MySQL!!</p>
  
  <p>Since MySQL is our prod database, I have no other choice but to ignore the unit-tests!!</p>
  
  <p>Is there a solution for this on the H2 database side?</p>
  
  <p>Thanks</p>