Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API reinitialises the database on restart #21

Open
DJWalker42 opened this issue Feb 20, 2024 · 2 comments
Open

API reinitialises the database on restart #21

DJWalker42 opened this issue Feb 20, 2024 · 2 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@DJWalker42
Copy link
Contributor

An API service restart reinitialises the database meaning it returns the database to the state as defined by 'AppLifeCycleBean', which is essentially the implementation of 'EmerlinExample'. It now might be more useful to have a one-off database initialisation command that is separate from the API service such that an API service restart does not wipe the database. Is this possible?

@DJWalker42 DJWalker42 added enhancement New feature or request question Further information is requested labels Feb 20, 2024
@pahjbo
Copy link
Member

pahjbo commented Mar 19, 2024

Actually, I think that the initialisation is idempotent, but I take the point that the example instance should probably be moved out on final publication. It would be a good thing to set up as a script with the https://github.com/orppst/pst-cli-app when that is sufficiently developed

@pahjbo
Copy link
Member

pahjbo commented Apr 4, 2024

Clarification - the code that adds the content to the database does not destroy anything - however the JPA deployment itself is set to drop tables first, so that every test deployment will start afresh - have made a change to the deployed settings so that only table updates are attempted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants