Skip to main content

Cookie settings

We use cookies to ensure the basic functionalities of the website and to enhance your online experience. You can configure and accept the use of the cookies, and modify your consent options, at any time.

Essential

Preferences

Analytics and statistics

Marketing

Implement PostgreSQL support in Mautic via minimal compatibility layer

Lot companies and users cannot use Mautic today because they run PostgreSQL in production (enterprise policy, existing infrastructure, managed platforms such as Supabase, AWS Aurora PostgreSQL, Azure PostgreSQL, etc.). Mautic has been MySQL/MariaDB-only since 2017 (when PostgreSQL support was effectively removed), which blocks adoption in many organisations and forces people to maintain private forks or give up on Mautic entirely.

This project will see the addition of officially supported PostgreSQL support starting with Mautic 7.1 using the proven and widely accepted “minimal compatibility layer” approach:

  1. During installation/upgrade, a Doctrine migration (executed only on PostgreSQL) creates few well-known MySQL compatibility functions and operators that Mautic already uses and boolean ↔ integer operators (legacy tinyint ↔ boolean compare)

  2. A very small number of queries that cannot be polyfilled 100 % (a few hand-written raw SQL fragments) are rewritten with tiny platform-specific alternatives or native PostgreSQL equivalents. → This introduces only a handful of if platform checks – far fewer than 50 lines in total.

  3. No requirement for root access or C extensions – everything works with normal CREATE FUNCTION / CREATE OPERATOR privileges, which are granted by all self-hosted setups and the vast majority of managed PostgreSQL providers.

This is a proven strategy used by many large PHP projects (e.g., Laravel apps, Symfony-based systems) and similar to GitLab's native PG migration, minimizing maintenance while enabling multi-DB support.

Comment

Confirm

Please log in

You can access with your Mautic Forums account or create an account here.

Share