Skip to content

feat: support MySQL 8 next to PostgreSQL - #2

Merged
schmunk42 merged 1 commit into
masterfrom
feature/mysql-support
Dec 1, 2026
Merged

schmunk42 merged 1 commit into
masterfrom
feature/mysql-support

Conversation

@schmunk42

Copy link
Copy Markdown
Member

What

  • The workflow Tests runs the migrations and the integration suite (group database included) on PostgreSQL 16 and on MySQL 8.0 (utf8mb4, utf8mb4_unicode_ci).
  • The test infrastructure is database-neutral: schema reset and assertions go through the DBAL schema manager, UUID values and parameters are typed.
  • New migration Version20261201180000, MySQL and MariaDB only: webhook_event.dedupe_key gets a binary collation (utf8mb4_0900_bin on MySQL 8, utf8mb4_bin otherwise), so the unique index on (endpoint_id, dedupe_key) compares delivery keys exactly, as on PostgreSQL. DedupeKeyCollationListener adds the same collation to the ORM schema on these platforms, so the schema tool reports no diff.
  • On every other platform the migration produces no SQL and is recorded as executed; the PostgreSQL schema does not change. Version20261127220000 is untouched.
  • Tests on both databases: dedupe keys that differ only in letter case are two events, a duplicate is accepted without a second event, and a payload of 1 MiB is stored completely.
  • README names both databases, CHANGELOG has the entry for 0.1.1.

Upgrade

Installations on MySQL or MariaDB run the migrations. PostgreSQL installations need nothing; the migration is a no-op there.

Not part of this change

  • CLAUDE.md still says the group database needs PostgreSQL.
  • Slug lookups of the console commands and the type/status/slug filters follow the column collation on MySQL (case-insensitive by default). The intake is not affected, it validates the slug pattern first.

🤖 Generated with Claude Code

The workflow runs the migrations and the integration suite on
PostgreSQL 16 and MySQL 8.0. The test infrastructure no longer depends
on PostgreSQL syntax. A new migration gives webhook_event.dedupe_key a
binary collation on MySQL and MariaDB, so the unique index compares
delivery keys exactly as on PostgreSQL; a schema listener adds the same
collation to the ORM schema there. Other platforms keep their schema.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@schmunk42 schmunk42 self-assigned this Dec 1, 2026
@schmunk42
schmunk42 merged commit 05581f5 into master Dec 1, 2026
4 checks passed
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.

1 participant