gradle-plugins icon indicating copy to clipboard operation
gradle-plugins copied to clipboard

Scripts generated with jpa-schema-gen don't match default Flyway naming

Open audreyloeffel opened this issue 5 years ago • 1 comments

Hi,

On version 0.9.20190424150743, the names of the scripts don't match the default naming convention of flyway:

I got: v0.1.1.200__create_tables.sql but v should be in uppercase.

audreyloeffel avatar Jul 18 '19 07:07 audreyloeffel

Yep, alignment is not perfect there, known issue actually.

The prefix can be configured on flyway execution: https://flywaydb.org/documentation/commandline/migrate#sqlMigrationPrefix

Java: props.put(ConfigUtils.SQL_MIGRATION_PREFIX, "v"); flyway.configure(props);

Spring boot: spring.flyway.sql-migration-prefix=V # File name prefix for SQL migrations.

A PR needs to address the FlywaySchemaTarget.java to consume the prefix from SchemaGenExtension.java, minor. Question is, if alignment should be done on V (flyway) or v (backward compatibility).

birdli66 avatar Jul 18 '19 08:07 birdli66