Skip to content

Conversation

@TheMeinerLP
Copy link
Member

@TheMeinerLP TheMeinerLP commented Sep 4, 2025

Overview

This PR replaces the database layer with intentional breaking changes. The aim is to modernize the architecture in some places.

Issues get maybe be fixed

Fixes #3573
Fixes #3274
Fixes #3573
Fixes #4128
Fixes #4105
Fixes #4612
Fixes #2994
Fixes #4732
Fixes #2963
Fixes #4326
Fixes #3237
Fixes #3287
Fixes #4386
Fixes #2273

Description

This PR replaces the current database layer with a combination of JPA, Hibernate, FlywayLiquiBase, and Hikaricp.
The use of Flyway is intended to ensure that an update to PlotSquared v8 is possible without data loss.

The design pattern repository was used extensively to enable testability. Named queries were also used to maintain high maintainability. Staying on the topic of queries, we use HQL (Hibernate Query Language) to enable users to also use other database types that are not supplied by PlotSquared as standard, e.g., h2, Postgresql, MS SQL, Oracle.

Flyway serves as a tool for making database schema changes in the future, allowing us to enforce third normal form in an 8.1 version to further flatten data handling and prevent problems.

Open to-dos:

  • Restoration of the database migration command
  • Migration from v7 to v8 database structure
  • JUnit tests with and without TestContainers
  • Replacing the DBFunc class with a clean service layer
  • Testing all database functions
  • Testing Bakery test data
  • (Make beta/alpha test available to the community)
  • Discuss how we can get the jar size issues under control
    - [ ] (Improve StorageSQL configuration with https://commons.apache.org/proper/commons-configuration/)
  • Integrate HikariCP
  • (After implementation of async calls)

Submitter Checklist

  • Make sure you are opening from a topic branch (/feature/fix/docs/ branch (right side)) and not your main branch.
  • Ensure that the pull request title represents the desired changelog entry.
  • New public fields and methods are annotated with @since TODO.
  • I read and followed the contribution guidelines.

TheMeinerLP and others added 25 commits September 7, 2025 00:05
@NotMyFault
Copy link
Collaborator

Given this produces a ~52M jar, this cannot be considered to be merged or reviewed.

@TheMeinerLP
Copy link
Member Author

There are possiblties to reduce the jar size

@github-actions
Copy link

github-actions bot commented Sep 9, 2025

Please take a moment and address the merge conflicts of your pull request. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment