9. Wiki Data

The following topics describe how edX stores wiki data internally, and is useful for developers and researchers who are examining database exports.

EdX currently uses an external application called django-wiki for wiki functionality within courses.

In the data package, wiki data is delivered in two .sql files.

  • The wiki_article file is a container for each article that is added to the wiki. The full name of this file also includes the organization and course, and indicates a source of either prod (edX) or edge, in this format: {org}-{course}-{date}-wiki_article-{site}-analytics.sql.
  • The wiki_articlerevision file stores data about the articles, including data about changes and deletions. The full name of this file is in this format: {org}-{course}-{date}-wiki_articlerevision-{site}-analytics.sql.

The same conventions apply to wiki data as to student data.

9.1. Fields in the wiki_article File

The header row of the wiki_article SQL file, and a row of sample data, follow.

id  current_revision_id created modified  owner_id  group_id  group_read  group_write
other_read  other_write

1437  29819 2013-07-17 21:53:57 2014-01-26 14:48:02 NULL  NULL  1 1 1 1

The table that follows provides a reference to each field in this file. A description of each field follows the table.

Field Type Null Key
id int(11) NO PRI
current_revision_id int(11) NO UNI
created datetime NO  
modified datetime NO  
owner_id int(11) YES MUL
group_id int(11) YES MUL
group_read tinyint(1) NO  
group_write tinyint(1) NO  
other_read tinyint(1) NO  
other_write tinyint(1) NO  

9.1.1. id

The primary key.

9.1.2. current_revision_id

The ID of the revision that displays for this article.

9.1.3. created

The date the article was created.

9.1.4. modified

The date the article properties were last modified.

9.1.5. owner_id

The owner of the article, usually the creator. The owner always has both read and write access.

9.1.6. group_id

As in a UNIX file system, permissions can be given to a user according to group membership. Groups are handled through the Django authentication system.

9.1.7. group_read

Defines whether the group has read access to the article. 1 if so, 0 if not.

9.1.8. group_write

Defines whether the group has write access to the article. 1 if so, 0 if not.

9.1.9. other_read

Defines whether others have read access to the article. 1 if so, 0 if not.

9.1.10. other_write

Defines whether others have write access to the article. 1 if so, 0 if not.

9.2. Fields in the wiki_articlerevision File

The header row of the wiki_articlerevision SQL file, and a row of sample data, follow.

id  revision_number user_message  automatic_log ip_address  user_id modified  created
previous_revision_id  deleted locked  article_id  content title

17553 1 Course page automatically created.    NULL  NULL  2013-07-17 21:53:57 2013-07-17
21:53:57 NULL  0 0 1437  This is the wiki for edX's edX Demonstration Course.  DemoX

The table that follows provides a reference to the characteristics of each field in this file. Descriptions of the fields follow the table.

Field Type Null Key
id int(11) NO PRI
revision_number int(11) NO  
user_message longtext NO  
automatic_log longtext NO  
ip_address char(15) YES  
user_id int(11) YES MUL
modified datetime NO  
created datetime NO  
previous_revision_id int(11) YES MUL
deleted tinyint(1) NO  
locked tinyint(1) NO  
article_id int(11) NO MUL
content longtext NO  
title varchar(512) NO  

9.2.1. id

The primary key.

9.2.2. revision_number

The ID of the revision.

9.2.3. user_message

The message the user added when saving the revision.

9.2.4. automatic_log

Some changes to wiki pages are logged to make the revision history for an article available in the user interface.

9.2.5. ip_address

The IP address of the device where the revision was made.

9.2.6. user_id

The ID of the user who made the revision.

9.2.7. modified

The date the article was last modified.

9.2.8. created

The date the article was created.

9.2.9. previous_revision_id

The ID of the revision previous to this one.

9.2.10. deleted

Defines whether the revision was deleted.

9.2.11. locked

Defines whether the revision is locked.

9.2.12. article_id

The ID of the revision that displays data for this article.

9.2.13. content

The content of the article revision.

9.2.14. title

The title of the article revision.