title: H2 Database - Unknown data type of MySQL script
body: <p>I'm new in using in-memmory database.</p>
  <p>I tried to use <strong>H2 database</strong> for developing project with <em>spring boot, spring data JPA,</em> but i got a problem when initialize application.</p>
  <blockquote>
  <p>Caused by: org.h2.jdbc.JdbcSQLException: Unknown data type: &quot;FK_PERSON__PERSONTYPE_IDX&quot;; SQL statement:</p>
  </blockquote>
  <p>Because this script was exported from MySQL. So i thinked there are some wrong syntax which H2 does not understand</p>
  <p>For example, this is a part of script:</p>
  <pre>
  <code>CREATE TABLE `person` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `firstname` varchar(255) NOT NULL,
    `lastname` varchar(255) DEFAULT NULL,
    `type` int(11) NOT NULL,
    `address` text,
    PRIMARY KEY (`id`),
    KEY `fk_person__persontype_idx` (`type`),
    CONSTRAINT `fk_person__persontype` FOREIGN KEY (`type`) REFERENCES `persontype` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='  ';</code></pre>
  <p>And i tried some solutions from these:</p>
  <blockquote>
  <p><a href="https://stackoverflow.com/questions/11610850/convert-mysql-script-to-h2">Convert MySQL script to H2</a></p>
  <p><a href="http://matthewcasperson.blogspot.de/2013/07/exporting-from-mysql-to-h2.html" rel="nofollow noreferrer">http://matthewcasperson.blogspot.de/2013/07/exporting-from-mysql-to-h2.html</a></p>
  </blockquote>
  <p>Replace symbols with double quotes, single quotes,... even not use quote at all but not working.
  Please show me why?
  Thank you.</p>