import.sql not executed?

362 views
Skip to first unread message

Alex Soto Bueno

unread,
Jan 25, 2021, 11:05:57 AM1/25/21
to Quarkus Development mailing list
Ok sorry for yet another post about this, but I've got a project with a Quarkus 1.11..0.

I created an import.sql file at src/main/resources directory. I start Quarkus in dev mode and the database.generation attribute is update. Is it normal that the schema is created but no data is imported?

In log lines of Quarkus app there is no error nor warning.

Alex Soto Bueno

unread,
Jan 25, 2021, 11:29:56 AM1/25/21
to Quarkus Development mailing list
Ok I found that changing to drop-and-create generation mode worked, I guess the reasoning is that if you're updating, you already have something, and don't want to import anything.But could we drop a log line (maybe WARNING) saying that since it is in update generation style and sql-load-script has been detected that it is not going to be applied?

Sanne Grinovero

unread,
Jan 25, 2021, 12:03:04 PM1/25/21
to Alex Soto Bueno, Quarkus Development mailing list
On Mon, 25 Jan 2021 at 16:30, Alex Soto Bueno <asot...@redhat.com> wrote:
>
> Ok I found that changing to drop-and-create generation mode worked, I guess the reasoning is that if you're updating, you already have something, and don't want to import anything.But could we drop a log line (maybe WARNING) saying that since it is in update generation style and sql-load-script has been detected that it is not going to be applied?

Are you sure you'd want that? Then people have to delete resources
from their build to get the concerning warnings disappear.

This has always been normal behaviour in Hibernate ORM, I suspect that
most users are familiar with the current conventions.

>
> On Monday, January 25, 2021 at 5:05:57 PM UTC+1 Alex Soto Bueno wrote:
>>
>> Ok sorry for yet another post about this, but I've got a project with a Quarkus 1.11..0.
>>
>> I created an import.sql file at src/main/resources directory. I start Quarkus in dev mode and the database.generation attribute is update. Is it normal that the schema is created but no data is imported?
>>
>> In log lines of Quarkus app there is no error nor warning.
>
> --
> You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/a43477b7-28e3-4b8e-9ded-5e439d238147n%40googlegroups.com.

Alex Soto Bueno

unread,
Jan 25, 2021, 12:26:02 PM1/25/21
to sanne.g...@gmail.com, Quarkus Development mailing list
I am not saying that I want to execute the sql file but do a warning/info log line. I always prefer to have the info in the console rather than in the docs. But of course it is a personal lazy preference.

You received this message because you are subscribed to a topic in the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/quarkus-dev/080_hJTeDz8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAFm4XO3W%3DHiFnkvAGqQOF446ne-aPvr0tO8b-vkrZ0UUCMd%3D4w%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages