Skip to content

feat(database): migrate backend to PostgreSQL - #107

Merged
hugoalves-dev merged 11 commits into
mainfrom
feat/migrate-postgresql
Nov 23, 2026
Merged

hugoalves-dev merged 11 commits into
mainfrom
feat/migrate-postgresql

Conversation

@hugoalves-dev

@hugoalves-dev hugoalves-dev commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Switch runtime and Flyway dependencies/configuration to PostgreSQL and native UUIDs.
  • Add a PostgreSQL migration history, GIN-backed assistant search, PostgreSQL Compose and load-test setup, and Testcontainers-backed integration/E2E database configuration.
  • Document data migration, cutover, and rollback steps.

Closes #106

Validation

  • Backend CI tests and package job passed on the current head.
  • Qodana completed successfully.
  • Production-data dry run and cutover remain operator steps and are documented in the README.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

Qodana for JVM

It seems all right 👌

No new problems were found according to the checks applied

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2025.3.2
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

@hugoalves-dev hugoalves-dev self-assigned this Nov 12, 2026
@hugoalves-dev
hugoalves-dev merged commit 16206d9 into main Nov 23, 2026
7 checks passed
@hugoalves-dev
hugoalves-dev deleted the feat/migrate-postgresql branch November 23, 2026 15:14
hugoalves-dev pushed a commit that referenced this pull request Nov 23, 2026
The PostgreSQL migration (#107) branched before the assistant quota (#110)
landed, so the Postgres schema lacked assistant_request_reservations and
assistant_quota_locks, and the entity still declared BINARY(16) columns.
With ddl-auto=validate the app would not start on PostgreSQL, and the data
migrator would refuse the cutover because the MariaDB source has the tables.

- add PostgreSQL V37 with both tables and the lock row seed
- map the reservation UUIDs with the native type
- migrator: expect Flyway V37 and replace the seeded lock row on import

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GfjfbSZRwVyCUYMTGSLCAA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(database): migrar persistência de MariaDB para PostgreSQL

1 participant