You mean, pages like MediaWiki has but modified for use in Labs? I don't think there's MediaWiki-style documentation on that, I'd just use the 'list databases', 'list tables' and 'describe $view' commands. You can use 'show create view $view' to see some restrictions (e.g. it selects NULL in place of user.user_password), but that doesn't always tell you everything as tables (and columns?) can get filtered out before a row even gets to the labsdb machines.
On 1 October 2017 at 05:14, Martin Domdey animalia@gmx.net wrote:
May I ask you, where you could find a database schema?
Regards, Martin
-- Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet. Am 01.10.2017, 06:10, Alex Monk krenair@gmail.com schrieb:
The MediaWiki schema description is only valid for the underlying database, you do not have access to that as a labs user - you just have security-sanitised views. rev_text_ids are not useful to you as you cannot access revision texts via the DBs - you must go through the API.
On 1 October 2017 at 04:31, Roy Smith roy@panix.com wrote:
I’ve been exploring the enwiki database. I can find the page row for [[Iron]]
MariaDB [enwiki_p]> select page_title from page where page_id = 14734; +------------+ | page_title | +------------+ | Iron | +------------+
It looks like it has the right number of revisions:
MariaDB [enwiki_p]> select count(*) from revision where rev_page = 14734; +----------+ | count(*) | +----------+ | 5560 | +----------+
But, all of the rev_text_ids are 0
MariaDB [enwiki_p]> select rev_text_id from revision where rev_page = 14734 and rev_text_id != 0; Empty set (0.02 sec)
The schema description seems pretty straight-forward. What am I not understanding?
Cloud mailing list Cloud@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/cloud
Cloud mailing list Cloud@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/cloud
Cloud mailing list Cloud@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/cloud
Sorry - that was supposed to be 'show databases' and 'show tables'.
On 1 October 2017 at 05:26, Alex Monk krenair@gmail.com wrote:
You mean, pages like MediaWiki has but modified for use in Labs? I don't think there's MediaWiki-style documentation on that, I'd just use the 'list databases', 'list tables' and 'describe $view' commands. You can use 'show create view $view' to see some restrictions (e.g. it selects NULL in place of user.user_password), but that doesn't always tell you everything as tables (and columns?) can get filtered out before a row even gets to the labsdb machines.
On 1 October 2017 at 05:14, Martin Domdey animalia@gmx.net wrote:
May I ask you, where you could find a database schema?
Regards, Martin
-- Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet. Am 01.10.2017, 06:10, Alex Monk krenair@gmail.com schrieb:
The MediaWiki schema description is only valid for the underlying database, you do not have access to that as a labs user - you just have security-sanitised views. rev_text_ids are not useful to you as you cannot access revision texts via the DBs - you must go through the API.
On 1 October 2017 at 04:31, Roy Smith roy@panix.com wrote:
I’ve been exploring the enwiki database. I can find the page row for [[Iron]]
MariaDB [enwiki_p]> select page_title from page where page_id = 14734; +------------+ | page_title | +------------+ | Iron | +------------+
It looks like it has the right number of revisions:
MariaDB [enwiki_p]> select count(*) from revision where rev_page = 14734; +----------+ | count(*) | +----------+ | 5560 | +----------+
But, all of the rev_text_ids are 0
MariaDB [enwiki_p]> select rev_text_id from revision where rev_page = 14734 and rev_text_id != 0; Empty set (0.02 sec)
The schema description seems pretty straight-forward. What am I not understanding?
Cloud mailing list Cloud@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/cloud
Cloud mailing list Cloud@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/cloud
Cloud mailing list Cloud@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/cloud
Hi Martin,
On 01-10-17 07:34, Martin Domdey wrote:
I'm talking about something like this: https://upload.wikimedia.org/wikipedia/commons/f/f7/MediaWiki_1.24.1_databas... , a graphical database schema, but I guess that it is outdated and needs to be updated.
You're looking at the layout for 1.24 , have a look at https://commons.wikimedia.org/w/index.php?title=File:MediaWiki_database_sche... , that's currently 1.28.0 from January this year.
Maarten
The database schema is available at https://phabricator.wikimedia.org/source/mediawiki/browse/master/maintenance...
It's not too useful, but I would say that sometimes having the (opaque) rev_text_id could be handy, eg. to detect a rollback.
Cheers
On Mon, Oct 2, 2017 at 12:30 AM, Platonides platonides@gmail.com wrote:
The database schema is available at https://phabricator.wikimedia.org/source/mediawiki/browse/master/maintenance...
It's not too useful, but I would say that sometimes having the (opaque) rev_text_id could be handy, eg. to detect a rollback.
It is not possible to detect reversions with the rev_text_id, because a new one is generated every time. Eg.: https://en.wikipedia.org/w/index.php?title=Winston_Churchill&type=revisi...
root@dbstore1002:~$ my enwiki -e "SELECT rev_text_id FROM revision where rev_id = 797890286" +-------------+ | rev_text_id | +-------------+ | 807306920 | +-------------+ root@dbstore1002:~$ my enwiki -e "SELECT rev_text_id FROM revision where rev_id = 797893046" +-------------+ | rev_text_id | +-------------+ | 807309755 | +-------------+
rev_text_id are meaningless and prone to change (not stable). Some people use sha hashes to detect reversions. Given it is not useful without the private text table, it is more per formant to remove the whole column than suffering the penalty of conditional filtering on every revision query, plus we avoid the temptation to use it as if they were stable ids, as you suggested :-).