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

Provide a solution to migrate from MySQL or MSSQL to PostgreSQL #881

Open
Tracked by #860
nscuro opened this issue Oct 26, 2023 · 2 comments
Open
Tracked by #860

Provide a solution to migrate from MySQL or MSSQL to PostgreSQL #881

nscuro opened this issue Oct 26, 2023 · 2 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed p2 Non-critical bugs, and features that help organizations to identify and reduce risk size/XL Higher effort

Comments

@nscuro
Copy link
Member

nscuro commented Oct 26, 2023

Hyades will exclusively support PostgreSQL. Support for MySQL and MSSQL will be dropped.

The reasoning behind this decision is as follows:

Users of DT 4.x that use any of those RDBMSes will need to migrate, and we need to provide guidance on how to do it.

A while back I documented how this can be achieved using pgloader, moving from MySQL to PostgreSQL:

https://gist.github.com/nscuro/1d32c6099a8a82f98f737fffa936b416#file-instructions-md

Because we have introduced changes to the database schema since branching off from DT v4.x, using off-the-shelf solutions like pgloader is not an option anymore. We will need to write a custom tool that performs the migration.

@nscuro nscuro added documentation Improvements or additions to documentation p2 Non-critical bugs, and features that help organizations to identify and reduce risk size/L High effort labels Oct 26, 2023
@nscuro nscuro mentioned this issue Oct 26, 2023
34 tasks
@nscuro nscuro changed the title Provide guidance on how to migrate from MySQL or MSSQL to PostgreSQL Provide a solution to migrate from MySQL or MSSQL to PostgreSQL Feb 16, 2024
@nscuro nscuro added size/XL Higher effort and removed size/L High effort labels Feb 16, 2024
@nscuro nscuro added the good first issue Good for newcomers label Apr 12, 2024
@nscuro
Copy link
Member Author

nscuro commented Apr 12, 2024

Tagging as good first issue since it's a purely technical task that doesn't require too much knowledge of the code base.

This task involves the creation of a CLI tool that:

  • connects to a DT v4.x database (can be MSSQL or PostgreSQL, potentially H2)
  • connects to a new DT v5.x database
  • copies data from DT v4.x to DT v5.x, performing additional mappings as needed

The current database schema for PostgreSQL can be generated using the following script: https://github.com/DependencyTrack/hyades-apiserver/blob/main/dev/scripts/dbschema-generate.sh

The same can be done for DT v4.x with this script: https://github.com/DependencyTrack/dependency-track/blob/master/dev/scripts/dbschema-generate.sh

@worming004
Copy link
Contributor

worming004 commented Apr 16, 2024

Could we update the schema in the readme ? It is missleading that we could still use mssql server for hyades

image

EDIT : fixed with #1198

worming004 pushed a commit to worming004/hyades that referenced this issue Apr 16, 2024
The readme does not say explicitely that postgres is the only db, the schema was inducing there is alternatives, but it is not the case. See DependencyTrack#881

This commit present postgres as the only option
worming004 pushed a commit to worming004/hyades that referenced this issue Apr 16, 2024
The readme does not say explicitely that postgres is the only db, the schema was inducing there is alternatives, but it is not the case. See DependencyTrack#881

This commit present postgres as the only option

Signed-off-by: Mathieu Scolas <worming@hotmail.be>
@VinodAnandan VinodAnandan added the help wanted Extra attention is needed label Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed p2 Non-critical bugs, and features that help organizations to identify and reduce risk size/XL Higher effort
Projects
None yet
Development

No branches or pull requests

3 participants