Loading…
Loading…
What bench says when you create a site on it, and how much ERPNext is tested there.
MariaDB: the default
$ bench new-site erp.example.com
(creates the site — no warning)
Tested: ERPNext’s tests run on MariaDB for every pull request, and again every night.
Frappe’s install guide lists MariaDB 11.8 for version 16; setup warns on anything older than 10.6.
ERPNext still has raw SQL written for MariaDB. On PostgreSQL, Frappe rewrites every such query on the fly — edit one and see exactly how.
MariaDB runs
select name, grand_total from `tabSales Invoice` where docstatus = 1 and outstanding_amount > 0 order by posting_date desc limit 5
Unchanged.
PostgreSQL runs, after Frappe rewrites it
select name, grand_total from "tabSales Invoice" where docstatus = '1' and outstanding_amount > '0' order by posting_date desc limit 5
Backticks, locate(), from tab… and plain integers are the only things it changes.
Or write it with the query builder, and each database gets its own SQL
si = frappe.qb.DocType("Sales Invoice")
frappe.qb.from_(si).select(si.name, si.grand_total)
.where(si.docstatus == 1).orderby(si.posting_date, order=Order.desc).limit(5)For MariaDB
SELECT `name`,`grand_total` FROM `tabSales Invoice` WHERE `docstatus`=1 ORDER BY `posting_date` DESC LIMIT 5
For PostgreSQL
SELECT "name","grand_total" FROM "tabSales Invoice" WHERE "docstatus"=1 ORDER BY "posting_date" DESC LIMIT 5
For a business system, run ERPNext on MariaDB — it is what ERPNext is built and tested on, every day. If your company standardises on PostgreSQL, treat ERPNext as the exception rather than the test case.
MariaDB. It is the default when bench creates a site, and ERPNext’s automated tests run on it for every change and every night. Frappe’s install guide lists MariaDB 11.8 for version 16, and setup warns on anything older than 10.6.
No. MariaDB began as a fork of MySQL, but Frappe has no MySQL option — bench new-site accepts mariadb, postgres or sqlite.
Frappe can create a site on PostgreSQL, but bench itself says the support is in development and experimental. ERPNext’s Postgres tests run only when a change is specifically labelled for them.
Much of ERPNext’s SQL is written for MariaDB. Frappe rewrites backticks, locate() and plain numbers on the fly, but MariaDB functions such as ifnull or group_concat pass through unchanged.
Frappe ships no command that converts a site from one database to the other, and running on PostgreSQL is experimental. For a business system, stay on MariaDB.
We set up ERPNext on MariaDB the way Frappe tests it — backed up, monitored and upgraded with you. Talk to a consultant.
or write to info@acube.co
Kochi (Kadavanthra & Infopark) · Thiruvananthapuram · across India & overseas · In business since 2011