Open jjbuchan opened 3 years ago
By adding this configuration into a service's application.yml and running the service, it'll auto-generate a create.sql file in the project. You can then copy the relevant line out of that file and use it in a new migrations file.
application.yml
create.sql
spring: jpa: properties: javax: persistence: schema-generation: scripts: create-source: metadata action: create create-target: create.sql
Example sql generated:
There might be other better ways to do this(?) but this worked for me.
By adding this configuration into a service's
application.yml
and running the service, it'll auto-generate acreate.sql
file in the project. You can then copy the relevant line out of that file and use it in a new migrations file.Example sql generated:
There might be other better ways to do this(?) but this worked for me.