Giter Site home page Giter Site logo

Comments (5)

fabioformosa avatar fabioformosa commented on June 1, 2024

I'm not sure to have got your point. Anyway, if you need to run Quartz with a DB to persist the scheduler config, you don't need to run liquibase and switch spring.quartz.initialize-schema to always and later to never again. Simply you have to import the quartz-manager-starter-persistence dependency in your project. That dependency will run liquibase at the bootstrap to initialize the tables, only once, at the first bootstrap.
See this paragraph
Is it what you were looking for?

from quartz-manager.

midhunadarvin avatar midhunadarvin commented on June 1, 2024

I did try the same to bootstrap a newly created database with the scheduler configs. I used the docker-compose file in the quartz-manager-web-showcase project to create a new postgres container. I added the quartz-manager-starter-persistence as dependency. In application.yml, the database url, username, password are given. However when I started the quartz-manager-web-showcase project the qrtz_* tables were not created.

I think why it doesn't work is because spring.quartz.initialize-schema is set to never in the quartz-persistence.properties

When i set this property to always, the tables are initialized, but I could see stack overflow links where when we set spring.quartz.initialize-schema to always, the tables are dropped and created again on every restart of the application.
https://stackoverflow.com/questions/64101847/spring-boot-quartz-jdbc-tables-are-always-initailized

Is there anything that i might have missed ?

from quartz-manager.

fabioformosa avatar fabioformosa commented on June 1, 2024

You've got a bug.
spring.quartz.initialize-schema is set to never in the quartz-persistence.properties, because quartz-manager-starter-persistence has the quartz DB scripts within it and it should execute them through liquibase, at the bootstrap.
Unfortunately, liquibase isn't finding the changelog, thus quartz DB scripts are not executed.
Thank you to have notified it.
I'm debugging...

from quartz-manager.

fabioformosa avatar fabioformosa commented on June 1, 2024

Hi @midhunadarvin, I've just fixed. I've released the ver 4.0.9 with this fix and your already merged contributions.
I confirm that it's enough to import the dependency quartz-manager-starter-persistence to get initialized the tables.
You can get an example here: https://github.com/fabioformosa/quartz-manager-use-cases/tree/main/with-persistence

from quartz-manager.

midhunadarvin avatar midhunadarvin commented on June 1, 2024

Thanks @fabioformosa . I checked it and confirm that it is working. Closing this issue.

from quartz-manager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.