I have an existing app written in PHP that I want to rebuild on Frappe.
The postgres dB schema is quite complex in terms of tables and relations, so I was wondering if and how I can automate the generation of all the doctypes for each table, to avoid the huge manual work on the GUI to rewrite all the field names, column types, etc.
Hey !
Each doctype is described by a json file, so you can create a script that take the db model of your PHP application to translate it to doctype json.
thanks for your suggestion, do you know if there’s any pre-made script of such kind I can start from?
Also, is there anything in Frappe’s roadmap to have a reverse engineering functionality to import existing DB models? It would for sure accelerate the migration of projects to Frappe framework.
It’s unlikely that something like this will ever exist. Frappe and postgres schema concepts do not map 1:1, and as a consequence pretty much any non-trivial translation would need to be use-case specific.