title: Hibernate ddl-auto=update is not working
body: <p>Every time I restart my tomcat server all the data in the database tables are deleted. But I want to keep the data in the database tables. What I understood so far after reading several posts is that <code>ddl-auto</code> should be set to update. </p>
  
  <p>In my spring boot application, I have following settings</p>
  
  <pre><code>security.basic.enabled=false
  server.port=9090
  spring.datasource.url=jdbc:h2:mem:AZ;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
  spring.datasource.driverClassName=org.h2.Driver
  spring.datasource.username=myuser
  spring.datasource.password=mypassword
  spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
  spring.jpa.generate-ddl=true
  spring.jpa.hibernate.ddl-auto=update
  hibernate.show_sql = true
  hibernate.format_sql = true
  spring.jpa.properties.hibernate.current_session_context_class=org.springframework.orm.hibernate4.SpringSessionContext
  </code></pre>
  
  <p>Unfortunately, this is not working as expected. All data in the table is deleted.</p>
  
  <p>This is log</p>
  
  <pre><code>2016-09-24 09:35:47.831  INFO 6343 --- [ost-startStop-1] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
  2016-09-24 09:35:47.852  INFO 6343 --- [ost-startStop-1] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
      name: default
      ...]
  2016-09-24 09:35:47.975  INFO 6343 --- [ost-startStop-1] org.hibernate.Version                    : HHH000412: Hibernate Core {4.3.11.Final}
  2016-09-24 09:35:47.979  INFO 6343 --- [ost-startStop-1] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
  2016-09-24 09:35:47.982  INFO 6343 --- [ost-startStop-1] org.hibernate.cfg.Environment            : HHH000021: Bytecode provider name : javassist
  2016-09-24 09:35:48.320  INFO 6343 --- [ost-startStop-1] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {4.0.5.Final}
  2016-09-24 09:35:48.954  INFO 6343 --- [ost-startStop-1] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
  2016-09-24 09:35:49.211  INFO 6343 --- [ost-startStop-1] o.h.h.i.ast.ASTQueryTranslatorFactory    : HHH000397: Using ASTQueryTranslatorFactory
  2016-09-24 09:35:49.861  INFO 6343 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaUpdate  : HHH000228: Running hbm2ddl schema update
  2016-09-24 09:35:49.861  INFO 6343 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaUpdate  : HHH000102: Fetching database metadata
  2016-09-24 09:35:49.866  INFO 6343 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaUpdate  : HHH000396: Updating schema
  2016-09-24 09:35:49.882  INFO 6343 --- [ost-startStop-1] java.sql.DatabaseMetaData                : HHH000262: Table not found: user
  2016-09-24 09:35:49.885  INFO 6343 --- [ost-startStop-1] java.sql.DatabaseMetaData                : HHH000262: Table not found: user
  2016-09-24 09:35:49.887  INFO 6343 --- [ost-startStop-1] java.sql.DatabaseMetaData                : HHH000262: Table not found: user
  2016-09-24 09:35:49.907  INFO 6343 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaUpdate  : HHH000232: Schema update complete
  </code></pre>
  
  <p>What I really need is to keep the data in the database table, even after restarting my server.</p>