q-shift / qshift-templates

Backstage templates for the Qshift demo
Apache License 2.0
1 stars 3 forks source link

Generated project dont include the proper application.properties & import.sql #49

Open cmoulliard opened 2 months ago

cmoulliard commented 2 months ago

Issue

When we generate a project using the option starter=true with code.quarkus.io, then the generated project don't include:

%prod.quarkus.hibernate-orm.sql-load-script=import.sql %prod.quarkus.hibernate-orm.database.generation=drop-and-create

- import.sql file matching the entity

-- This file allow to write SQL commands that will be emitted in test and dev. insert into myentity (id, field) values(1, 'field-1'); insert into myentity (id, field) values(2, 'field-2'); insert into myentity (id, field) values(3, 'field-3'); alter sequence myentity_seq restart with 4;



![Screenshot 2024-04-17 at 10 05 08](https://github.com/q-shift/qshift-templates/assets/463790/83f87e93-2d85-420c-9e5d-8fcc8e231fac)

Query: `https://code.quarkus.io/?e=rest&e=hibernate-orm-rest-data-panache&e=jdbc-postgresql&extension-search=postgres`
cmoulliard commented 2 months ago

I think we should keep in our backstage template the generation of the content of "application.properties" with the database properties (postgresql, h2, etc) + username and db

I'm more skeptical about the import.sql file because we are dependent on what code.quarkus.io generates and that could change if the Entity name change over the time

@aureamunoz WDYT ?

aureamunoz commented 2 months ago

Yes, I think it would be easier to managed and quicker to craft if we need modifications and tailored features

cmoulliard commented 2 months ago

Soon, we will add primaza to resolve such issue ;-)