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

Use liquibase to deploy schema changes in api server #774

Closed
Tracked by #860
VithikaS opened this issue Aug 29, 2023 · 1 comment · Fixed by DependencyTrack/hyades-apiserver#442
Closed
Tracked by #860
Assignees
Labels
component/api-server enhancement New feature or request p3 Nice-to-have features proposal size/M Medium effort

Comments

@VithikaS
Copy link
Collaborator

Since we are supporting only Postgres database now, we can look at liquibase to deploy schema changes. It will help with better versioning of database changes, keeping it always in sync with the application.

All schema changes should be backported to changelog.yaml. When application starts, liquibase will apply all the changes in changelog file to database so we need checks that changeset is not executed if database object already exists. Alternative is to let it fail and mark the changeset as already executed.

@VithikaS VithikaS added enhancement New feature or request p3 Nice-to-have features proposal component/api-server labels Aug 29, 2023
@nscuro
Copy link
Member

nscuro commented Oct 18, 2023

I started working on a PoC for this during my holidays, but for vanilla DT: https://github.com/nscuro/dependency-track/commits/liquibase-poc

I realized that many indexes are ineffective for some RDBMSes, and that index declaration is different across RDBMSes as well. So even when supporting multiple, there's not really a way around proper migration management. Schema generation from DataNucleus just doesn't cut it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/api-server enhancement New feature or request p3 Nice-to-have features proposal size/M Medium effort
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants