@Column(unique = true) produces a WARN o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000

Spring Boot 2.0 (Hibernate 5?) apparently uses DROP_RECREATE_QUIETLY as unique constraint update strategy which is really wrong as a default option, because simply what it does each time you start the app is removing the unique index and creating it again. If you work on databases with some (a lot of?) data I can imagine how slow will be the start of everything with this option.

In such scenario, when you start on empty database, operation of removing the index generates warning which you can see in the logs. When you start again, the warning dissapears but it silently does the expensive operation of recreating index.

To disable this you need to switch the strategy back to RECREATE_QUIETLY with following params:

# for plain hibernate
hibernate.schema_update.unique_constraint_strategy=RECREATE_QUIETLY

# for spring data
spring.jpa.properties.hibernate.schema_update.unique_constraint_strategy=RECREATE_QUIETLY

This looks like a bug.

I'd recommend you to create the schema via higher-level migration tools like flywaydb and let hibernate only validate the generated schema. It is integrated to spring-boot and it is very easy to setup, see the documantation and examples.

The benefit is that you have full control on the schema, you don't have unexpected schema changes while upgrading hibernate.

Usually automatical schema generation is used only during development, but not in production. You can find more details on why it is so important here.

Having such setup you might let hibernate generate the schema only in development mode, but flighway will take responsibility for the rest of the cases.