Skip to content

docs: Document PostgreSQL database support for Mautic 7.x#310

Draft
promptless-for-oss wants to merge 2 commits intomautic:7.1from
Promptless:promptless/pr-15926-postgresql-support
Draft

docs: Document PostgreSQL database support for Mautic 7.x#310
promptless-for-oss wants to merge 2 commits intomautic:7.1from
Promptless:promptless/pr-15926-postgresql-support

Conversation

@promptless-for-oss
Copy link
Copy Markdown

Open this suggestion in Promptless to view citations and reasoning process

Documents the reintroduction of PostgreSQL database support in Mautic 7.x (mautic/mautic#15926).

Changes

Development setup (docs/development-environment/setup.rst):

  • Added PostgreSQL configuration example alongside MySQL
  • Includes driver, port, and extension requirements

Database compatibility (docs/plugins/database.rst):

  • New "Database compatibility" section with comprehensive guidance
  • Documents supported databases table (MySQL 8.0+, MariaDB 10.6+, PostgreSQL 16+)
  • Case-insensitive string matching helpers (getILikeExpression, getLowerLikeExpression)
  • Column/alias quoting requirements for camelCase identifiers
  • GROUP BY strictness differences between platforms
  • Platform detection methods and best practices

Testing (docs/testing/e2e_test_suite.rst):

  • Added "Testing on multiple databases" section
  • Documents tested database versions (PostgreSQL 16/18, MariaDB 10.11/11.4, MySQL 8.4/9.4)
  • PostgreSQL test environment configuration
  • Database-specific test considerations

Why this matters for developers

  • Developers can now choose PostgreSQL as their database platform
  • Clear guidance on writing database-agnostic queries prevents runtime errors
  • Helper methods in CommonRepository abstract platform differences
  • Testing guidance helps ensure Plugins work across all databases

Source: PR #15926 - Reintroducing PostgreSQL Database Support in Mautic 7.x

Adds comprehensive developer documentation for PostgreSQL support:

- Development setup: Added PostgreSQL configuration example alongside MySQL
- Database compatibility: New section covering case-insensitive matching,
  column quoting, GROUP BY requirements, and platform detection
- Testing: Added multi-database testing guidance with PostgreSQL config

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
:returntype: string No newline at end of file
:returntype: string

Database compatibility
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Database compatibility section based on PR #15926. Key implementation files: CommonRepository.php, GeneratedColumnProvider.php.

Source: mautic/mautic#15926

**MySQL/MariaDB configuration:**

.. code-block:: php

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PostgreSQL configuration example from PR #15926. Uses pdo_pgsql driver on port 5432, requires PostgreSQL 16+.

Source: mautic/mautic#15926


Mautic supports MySQL, MariaDB, and PostgreSQL. The CI pipeline runs tests against all supported databases. Make sure your code works across all databases when developing features or writing tests.

Supported database versions
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multi-database testing section based on PR #15926. CI tests run on PostgreSQL 16/18, MariaDB 10.11/11.4, MySQL 8.4/9.4.

Source: mautic/mautic#15926

@RCheesley RCheesley changed the base branch from 5.x to 7.1 March 24, 2026 12:22
Updates the GROUP BY documentation to clarify that MySQL 8+ with
ONLY_FULL_GROUP_BY SQL mode enabled also enforces strict GROUP BY rules,
not just PostgreSQL. This ensures developers write compliant queries
that work across all supported databases and SQL modes.
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