Skip to content

Replace MySQL connector with PostgreSQL connector for Supabase database support#3

Merged
MaxiHubb2 merged 2 commits intomainfrom
copilot/fix-4536c3aa-6fb5-4881-a2c6-8deb9ad46f1b
Sep 18, 2025
Merged

Replace MySQL connector with PostgreSQL connector for Supabase database support#3
MaxiHubb2 merged 2 commits intomainfrom
copilot/fix-4536c3aa-6fb5-4881-a2c6-8deb9ad46f1b

Conversation

Copy link
Copy Markdown

Copilot AI commented Sep 18, 2025

This PR updates the database connector dependency from MySQL to PostgreSQL to enable connection to the Supabase PostgreSQL database that is already configured and tested with 32 tables.

Changes Made

  • build.gradle line 54: Replaced runtimeOnly 'com.mysql:mysql-connector-j' with runtimeOnly 'org.postgresql:postgresql'

Why This Change?

The application needs to connect to a Supabase PostgreSQL database instead of MySQL. Supabase exclusively uses PostgreSQL as its database engine, so the MySQL connector was preventing proper database connectivity.

Verification

  • ✅ Dependency resolution confirmed PostgreSQL connector (version 42.7.5) is now used
  • ✅ Project compilation successful with the new connector
  • ✅ No impact on other dependencies or application configuration
  • ✅ Application configuration in application.yml remains compatible (uses environment variables for database URL, username, and password)

Impact

This change enables the Spring Boot application to:

  • Connect to PostgreSQL databases including Supabase
  • Maintain all existing JPA/Hibernate functionality
  • Work with the existing 32-table database schema without any code changes

The change is minimal and maintains backward compatibility with the existing codebase while opening up PostgreSQL database support.

This pull request was created as a result of the following prompt from Copilot chat.

Update the build.gradle file to use PostgreSQL connector instead of MySQL connector to enable connection to Supabase PostgreSQL database.

Current issue:

  • Line 54: runtimeOnly 'com.mysql:mysql-connector-j' (MySQL connector)

Required change:

  • Replace with: runtimeOnly 'org.postgresql:postgresql' (PostgreSQL connector)

This change is needed to connect the Spring Boot application to a Supabase PostgreSQL database that is already configured and tested with 32 tables.

File to modify:

  • build.gradle (line 54)

Expected result:

  • Application will be able to connect to PostgreSQL databases instead of MySQL
  • Maintains all other existing dependencies and configuration

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: MaxiHubb2 <102926705+MaxiHubb2@users.noreply.github.com>
Copilot AI changed the title [WIP] Update database connector from MySQL to PostgreSQL for Supabase compatibility Replace MySQL connector with PostgreSQL connector for Supabase database support Sep 18, 2025
Copilot AI requested a review from MaxiHubb2 September 18, 2025 01:19
@MaxiHubb2 MaxiHubb2 marked this pull request as ready for review September 18, 2025 01:19
@MaxiHubb2 MaxiHubb2 merged commit 86d15e9 into main Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants