Freako F. Freakolowsky wrote:
I think it would be about time to start practicing what we preach (like, that MW is a great knowlagebase tool) and move all these comments to mw.org database manual pages. It's handy to have all those comments in the code, but to clutter the schema abstraction code over those comments is just silly.
You want them out of the code entirely, or only in once place (e.g. the mediawiki.schema file)? I'm all for the latter, especially as we can also automate the updating of the MW pages once we have a sane, machine-parseable schema in place.
Jeremy Postlethwaite wrote:
I'm open to using something existing: did you have something specific in mind? I didn't see anything out there that would be less trouble to customize than rolling our own.
Doctrine does versioning of databases in PHP:
Yeah, it is interesting, but severe overkill for what we are looking at here. I'm also loath to add another dependency, which I'm sure at the end of the day we are going to have to [monkey] patch anyway.
On 25. 04. 2012 20:25, Greg Sabino Mullane wrote:
Freako F. Freakolowsky wrote:
I think it would be about time to start practicing what we preach (like, that MW is a great knowlagebase tool) and move all these comments to mw.org database manual pages. It's handy to have all those comments in the code, but to clutter the schema abstraction code over those comments is just silly.
You want them out of the code entirely, or only in once place (e.g. the mediawiki.schema file)? I'm all for the latter, especially as we can also automate the updating of the MW pages once we have a sane, machine-parseable schema in place.
I wouldn't mind them being gone entirely from the source or at least them being in a separate file, like a doc special file for tables.sql. That way we can use the same base code for the creation of tables.sql files for each DB type as it's one less thing we have to make machine-readable. Keeping them in tables.sql file just complicates things.
My personal favorite option would be something like a i18n file for the db schema, that would map to [TYPE][OBJECT] or [TYPE][OBJECT][FIELD]. That way we don't complicate the abstract schema project, have code that can automate generation of mw pages for manual and can even have Siebrand translate it.
LP, jure
wikitech-l@lists.wikimedia.org