dependency-check / dependency-check/DependencyCheck

Provide automatic database schema migration

Open
#825 3 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
7.7k
Forks
1.4k
Avg merge
9d 22h
Merged PRs (30d)
13

Description

# Motivation
* As a DependencyCheck core developer I want an easily maintainable approach to implement database schema migrations.
* As a DependencyCheck user (using a DB other than the throwaway H2) I want an easy way to perform the initial setup and a frictionless DB update in case of DependencyCheck version updates.

# Solution sketch
A database schema migration tool like [Liquibase](http://www.liquibase.org/) or [Flyway](https://flywaydb.org/) could be used to automatically perform the initial setup and updates. This setup/migration could be triggered by the DependencyCheck "update" task/goal. The DependencyCheck core developer could implement schema changes w/o caring much about existing installations and the DependencyCheck user would automatically get these changes rolled out by a DependencyCheck version update w/o the need for manually running any SQL scripts (he needs to run "update" once before the first run of "analyze"). By having these migrations tied to "update" this would also suit for enterprise setups with readonly-access DB users used for the actual "analyze" runs.

As the initial setup would just be spinning up a fresh database (e.g. dockerized) and running the "update" task/goal, this also lowers the hurdle for new core developers to tackle database tuning like needed e.g. for #772 .

Furthermore this approach would facilitate the implementation of integration tests for different DBMS.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.