프로그램 사용/wiki2017. 1. 16. 13:17

깨끗한 모습은 아래와 같고..

page_id

Uniquely identifying primary key. This value is preserved across edits, renames, and, as of MediaWiki 1.27, deletions, via an analogous field in the archive table (introduced in MediaWiki 1.11). For example, for this page, page_id = 10501. [1][2] This field can be accessed by WikiPage::getId(), Title::getArticleID(), etc.


page_latest

This is a foreign key to rev_id for the current revision. It may be 0 during page creation. It needs to link to a revision with a valid revision.rev_page, or there will be the "The revision #0 of the page named 'Foo' does not exist" error when one tries to view the page. Can be obtained via WikiPage::getLatest(). 

[링크 : https://www.mediawiki.org/wiki/Manual:Page_table]


rev_id

This field holds the primary key for each revision. page_latest is a foreign key to this field.


rev_page

This field holds a reference to the page to which this revision pertains. The number in this field is equal to the page_id field of said page. This should never be invalid; if it is, that revision won't show up in the page history. If page.page_latest links to a revision with an invalid rev_page, this will cause the "The revision #0 of the page named 'Foo' does not exist" error.


rev_text_id

This is a foreign key to old_id in the text table. (The text table is where the actual bulk text is stored.) It's possible for multiple revisions to use the same text—for instance, revisions where only metadata is altered, or where a rollback is done to a previous version. 

[링크 : https://www.mediawiki.org/wiki/Manual:Revision_table]


The text table holds the wikitext of individual page revisions. If using Postgres or Oracle, this table is named pagecontent. 

[링크 : https://www.mediawiki.org/wiki/Manual:Text_table]


낙서를 좀 하면 아래와 같아지나?

page가 주제어에 따른 고유 id로 revision으로 page의 revision을 관리

revision에서는 text와 연결되어 revision 별로 관리 하는데..

그렇다면 page별 리비전은 

revision에서 rev_page값을 page의 page_id를 이용하여 검색하면 될거 같긴하네

내용 자체는 revision의 rev_text_id를 통해 text.old_id를 하면 될 거 같고


[링크 : https://www.mediawiki.org/wiki/Manual:Database_layout]

    [링크 : https://upload.wikimedia.org/wikipedia/commons/9/94/MediaWiki_1.28.0_database_schema.svg]



+

운영중인 위키에서 내용 본건데..

page 의 page_id와 page_latest

revision 의 rev_page와 rev_text_id

text 의 old_id


'프로그램 사용 > wiki' 카테고리의 다른 글

mediawiki upgrade 1.19(LTS) to ???  (0) 2018.04.20
mediawiki sql debug dump  (0) 2017.06.16
mediawiki 다국어 확장 및 번역 확장  (0) 2017.01.10
mediawiki 1.28.0과 Xcache  (0) 2017.01.09
mediawiki extension - deletehistory  (0) 2015.11.04
Posted by 구차니