Fix documentation

Add `create` as a valid values for `spring.jpa.hibernate.ddl-auto`

Fixes gh-2641
This commit is contained in:
Stephane Nicoll 2015-03-13 17:30:05 +01:00
parent 7b2b11903a
commit 3ecf512ab3
1 changed files with 7 additions and 7 deletions

View File

@ -1520,13 +1520,13 @@ database. This is controlled through two external properties:
[[howto-initialize-a-database-using-hibernate]] [[howto-initialize-a-database-using-hibernate]]
=== Initialize a database using Hibernate === Initialize a database using Hibernate
You can set `spring.jpa.hibernate.ddl-auto` explicitly and the standard Hibernate property You can set `spring.jpa.hibernate.ddl-auto` explicitly and the standard Hibernate property
values are `none`, `validate`, `update`, `create-drop`. Spring Boot chooses a default values are `none`, `validate`, `update`, `create`, `create-drop`. Spring Boot chooses a
value for you based on whether it thinks your database is embedded (default `create-drop`) default value for you based on whether it thinks your database is embedded (default
or not (default `none`). An embedded database is detected by looking at the `Connection` `create-drop`) or not (default `none`). An embedded database is detected by looking at the
type: `hsqldb`, `h2` and `derby` are embedded, the rest are not. Be careful when switching `Connection` type: `hsqldb`, `h2` and `derby` are embedded, the rest are not. Be careful
from in-memory to a '`real`' database that you don't make assumptions about the existence of when switching from in-memory to a '`real`' database that you don't make assumptions about
the tables and data in the new platform. You either have to set `ddl-auto` explicitly, or the existence of the tables and data in the new platform. You either have to set `ddl-auto`
use one of the other mechanisms to initialize the database. explicitly, or use one of the other mechanisms to initialize the database.
In addition, a file named `import.sql` in the root of the classpath will be executed on In addition, a file named `import.sql` in the root of the classpath will be executed on
startup. This can be useful for demos and for testing if you are careful, but probably startup. This can be useful for demos and for testing if you are careful, but probably