https://bugzilla.wikimedia.org/show_bug.cgi?id=37702

Marcin Cieślak <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #4 from Marcin Cieślak <[email protected]> 2012-09-20 
08:55:59 UTC ---
I think we have  two solutions:

1) Upload ready-to-use schema for unit testing. I think Selenium has some
MediaWiki dump stored for that purpose: 

http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/tests/selenium/data/mediawiki118_fresh_installation.sql?view=log

We should certainly not be running updater on this (maybe only once for all
tests) since it will take too much time.

2) Another solution is to snap some code from pg_dump or some ORM or some GUI
suolution and actually re-create the schema. Oracle has "duplicate_table"
function 

http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/maintenance/oracle/tables.sql?revision=109909&view=markup#l739

Maybe our Oracle friends can tell us how it good it works between Oracle
releases.

In case of PostgreSQL we have already a pretty good functionality to read
definitions of indexes in the PostgresField class which I recently updated to
work with older PostgreSQL versions. I think this is a good starting point.

Another advantage of solution #2 is that we could actually use the same code
in the updater and even rewrite schema definition in the PHP objects
(PostgresTable, PostgresField, etc..) instead of pure SQL - this way
we could easy compare "desired" schema with the "current" one. 

When working on the updater I am doing diffs between SQL dumps and this is not
a very good method.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to