Conversation
Bumps [org.apache.maven.plugins:maven-release-plugin](https://github.com/apache/maven-release) from 3.0.1 to 3.1.1. - [Release notes](https://github.com/apache/maven-release/releases) - [Commits](apache/maven-release@maven-release-3.0.1...maven-release-3.1.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-release-plugin dependency-version: 3.1.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.apache.maven.plugins:maven-source-plugin](https://github.com/apache/maven-source-plugin) from 3.2.1 to 3.3.1. - [Release notes](https://github.com/apache/maven-source-plugin/releases) - [Commits](apache/maven-source-plugin@maven-source-plugin-3.2.1...maven-source-plugin-3.3.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-source-plugin dependency-version: 3.3.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.apache.maven.plugins:maven-deploy-plugin](https://github.com/apache/maven-deploy-plugin) from 2.8.2 to 3.1.4. - [Release notes](https://github.com/apache/maven-deploy-plugin/releases) - [Commits](apache/maven-deploy-plugin@maven-deploy-plugin-2.8.2...maven-deploy-plugin-3.1.4) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-deploy-plugin dependency-version: 3.1.4 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [mysql:mysql-connector-java](https://github.com/mysql/mysql-connector-j) from 8.0.29 to 8.0.30. - [Changelog](https://github.com/mysql/mysql-connector-j/blob/release/9.x/CHANGES) - [Commits](mysql/mysql-connector-j@8.0.29...8.0.30) --- updated-dependencies: - dependency-name: mysql:mysql-connector-java dependency-version: 8.0.30 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…nnector-java-8.0.30 build(deps-dev): bump mysql:mysql-connector-java from 8.0.29 to 8.0.30
…en.plugins-maven-source-plugin-3.3.1 build(deps): bump org.apache.maven.plugins:maven-source-plugin from 3.2.1 to 3.3.1
…en.plugins-maven-deploy-plugin-3.1.4 build(deps): bump org.apache.maven.plugins:maven-deploy-plugin from 2.8.2 to 3.1.4
…en.plugins-maven-release-plugin-3.1.1 build(deps): bump org.apache.maven.plugins:maven-release-plugin from 3.0.1 to 3.1.1
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.0.0-M7 to 3.5.4. - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](apache/maven-surefire@surefire-3.0.0-M7...surefire-3.5.4) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-version: 3.5.4 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
- Spring Framework 5.3.21 → 5.3.39 - JUnit Jupiter 5.7.0 → 5.12.1 - Lombok 1.18.24 → 1.18.44 - Commons Logging 1.2 → 1.3.6 - Freemarker 2.3.31 → 2.3.34 - HikariCP 3.4.5 → 4.0.3 - MySQL Connector: migrated from mysql:mysql-connector-java:8.0.30 to com.mysql:mysql-connector-j:9.2.0 - H2 2.2.220 → 2.4.240 - SLF4J 1.7.30 → 2.0.16 - Log4j 2.17.2 → 2.24.3
MySQL 8.0.16+ strictly requires referenced columns in foreign keys to have a unique index. The DARWIN_PATCH.componentName FK referencing DARWIN.component failed on MySQL 8.4 because component only had a regular index. This adds unique index to MySQL/H2 create scripts, migration patches for existing installations, bumps DARWIN_COMPONENT_VERSION to 1.1, upgrades Docker MySQL from 8.0 to 8.4, and removes duplicate maven-source-plugin execution that caused build failure. Ref: #26
…en.plugins-maven-surefire-plugin-3.5.4 build(deps): bump org.apache.maven.plugins:maven-surefire-plugin from 3.0.0-M7 to 3.5.4
Resolves #25 (applied manually due to merge conflict with dev).
There was a problem hiding this comment.
Pull request overview
This PR updates Darwin’s infrastructural schema and build/runtime dependencies to support MySQL 8.4+ stricter FK requirements (unique referenced keys) and modernizes the project’s dependency/plugin stack.
Changes:
- Add uniqueness enforcement for
DARWIN.component(MySQL: unique index; H2: unique constraint) and introduce 1.1 migration/guess scripts. - Bump Darwin internal component schema version to
1.1. - Upgrade Maven dependencies/plugins and update the MySQL Docker image to
mysql:8.4.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/resources/META-INF/darwin/sql/mysql/create.sql | Makes IX_DARWIN_COMPONENT unique to satisfy MySQL FK referenced-key rules. |
| src/main/resources/META-INF/darwin/sql/mysql/patch_1.1.sql | Adds a migration intended to retrofit uniqueness on DARWIN.component. |
| src/main/resources/META-INF/darwin/sql/mysql/guess_1.1.sql | Adds guess script for schema version detection / patch skipping. |
| src/main/resources/META-INF/darwin/sql/h2/create.sql | Adds uniqueness enforcement for DARWIN.component in H2. |
| src/main/resources/META-INF/darwin/sql/h2/patch_1.1.sql | Adds H2 migration to create a unique index on DARWIN.component. |
| src/main/resources/META-INF/darwin/sql/h2/guess_1.1.sql | Adds H2 guess script for schema version detection / patch skipping. |
| src/main/java/one/edee/darwin/Darwin.java | Bumps DARWIN_COMPONENT_VERSION from 1.0 to 1.1. |
| pom.xml | Upgrades Spring/JUnit/Lombok/drivers/logging libs and Maven plugin versions. |
| docker/docker-compose.yml | Updates MySQL test container image from 8.0 to 8.4. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Use single ALTER TABLE to atomically replace index in patch_1.1.sql, preventing FK constraint violation on DROP INDEX - Fix guess_1.1.sql scripts (MySQL/H2) to verify actual unique index presence instead of just checking DARWIN_LOCK table existence Ref: #26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DARWIN.componentcolumn required by MySQL 8.0.16+ for FK references, with migration patches for existing installations (Foreign key constraint failure on MySQL 8.0.16+ due to missing UNIQUE index on DARWIN.component #26)