wikimedia-l | wikisource-l | meta | mediawiki | Phabricator | feedback

Shall we try Doctrine's Database Abstraction Layer for the installer?


#1

One of the suggestions I got after my talk in Tallinn is to try plugging in the Doctrine’s Database Abstraction Layer to manage schema changes for all supported databases.

It is available on packagist.org and can be easily attached via Composer.


#2

This comes up every once in a while. See e.g. the discussions for
https://www.mediawiki.org/wiki/Requests_for_comment/SQL_framework
https://www.mediawiki.org/wiki/Requests_for_comment/Abstract_table_definitions
https://www.mediawiki.org/wiki/Requests_for_comment/Data_mapper
(also related: https://www.mediawiki.org/wiki/Requests_for_comment/Third-party_components )

Someone needs to shepherd the proposal through an RfC and then come up with some performance comparisons (performance is what I’d expect to be the main source of skepticism).


#3

Thank you for the pointers! The good thing about the Doctrine’s DBAL is that is not connected to the ORM and you don’t have to use it construct queries if you don’t want to. I’d say we should trying using it just for schema creation/compare and update.

So the closest RFC to this is https://www.mediawiki.org/wiki/Requests_for_comment/Abstract_table_definitions. Doctrine’s way to represent the schema is http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/schema-representation.html which kind of looks similar. But of course the devil is in the details.