3 The most up-to-date schema for the tables in the database
4 should always be "tables.sql" in the maintenance directory,
5 which is called from the installation script. Here are a
6 few highlight that may be out of date:
11 integer, primary key, autoincrement
13 Usernames must be unique, must not be in the form of
14 an IP address. _Shouldn't_ allow slashes or case
15 conflicts. Spaces are allowed, and are _not_ converted
16 to underscores like titles. (Conflicts?)
18 Comma-separated list of textual flags.
20 Hash of current password.
22 Generated for mail-a-new-password feature
24 Note -- email should be restricted, not public info.
25 Same with passwords. ;)
27 Newline-separated list of name=value pairs.
31 cur (Wikipedia "current" articles)
34 integer, primary key, autoincrement
36 integer index into list of namespaces. See the
37 Namespace class for more details.
39 Title of article (in dbkey form--see Title), without
40 namespace. The combination of namespace,title should
41 be unique in this table.
43 Wikitext of the article.
45 The summary of the last change.
47 User id who made the last change, or 0 if unknown.
49 Name of the user above, or IP address.
51 Time of the last change.
53 Flag: 0 or 1 is last change was a "minor" edit.
55 Who may or may not edit the article.
57 Number of times this page has been viewed.
59 Text version of title for fulltext searches.
61 Plaintext version of text for fulltext searches.
63 1 indicates the article is a redirect.
65 1 indicates this was a minor edit.
67 1 indicates this is the first revision of a new entry.
71 old (Historical versions articles. Most fields
72 correspond to the same fields in "cur")
84 This last is currently unused.
88 archive (Temporary storage of deleted articles which may be restored.
89 Fields correspond to those of "cur" and "old")
99 This last is currently unused.
103 links (Internal links to existing articles)
106 ID of source article. (currently title, may be changed)
108 ID of target article.
112 brokenlinks (Internal links to non-existent articles)
117 Title of target link.
121 imagelinks (Internal links to images via [[Image:filename]] syntax)
124 Title of target article.
126 Filename of target image.
130 image (Uploaded images and other files)
137 Description field given during upload.
139 User ID who uploaded the file.
141 User name who uploaded the file.
143 Timestamp when upload took place.
147 oldimage (Old versions of images stored for potential revert)
152 Filename of stored old revision; timestamp and
153 exclaimation point prepended to oi_name
157 Description field given during upload.
159 User ID who uploaded the file.
161 User name who uploaded the file.
163 Timestamp when upload took place.
167 ipblocks (IP addresses and users blocked from editing)
170 Blocked IP address in dotted-quad form or ""
172 Blocked user ID or 0.
174 User ID who made the block.
176 Text comment made by blocker.
180 random (Random page queue)
183 1 = hasn't come up on a random page view yet.
184 >1 = has been viewed, will be ignored for a few
190 site_stats (Site-wide statistics)
193 Token for where clauses. There's only one row in
194 this table. At some point we might want to use a
195 date here so we can get stats-by-date.
197 Number of total views of all pages.
199 Number of total page edits.
201 Number of "countable" articles.
207 (Will document further when working)
214 Foreign key -> user_id
216 Namespace -> cur_namespace
217 Note that these should only include even-numbered
218 namespaces for regular pages; associated talk pages
219 (odd numbered namespaces) are folded in.
221 Page title -> cur_title
222 Note also that the linked page may not exist in page
223 or talk namespace, or at all.