| 1 |
-- This file is automatically generated using maintenance/generateSchemaSql.php. |
| 2 |
-- Source: sql/discussiontools_persistent.json |
| 3 |
-- Do not modify this file directly. |
| 4 |
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes |
| 5 |
CREATE TABLE /*_*/discussiontools_items ( |
| 6 |
it_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, |
| 7 |
it_itemname BLOB NOT NULL, it_timestamp BLOB DEFAULT NULL, |
| 8 |
it_actor BIGINT UNSIGNED DEFAULT NULL |
| 9 |
); |
| 10 |
|
| 11 |
CREATE UNIQUE INDEX it_itemname ON /*_*/discussiontools_items (it_itemname); |
| 12 |
|
| 13 |
|
| 14 |
CREATE TABLE /*_*/discussiontools_item_ids ( |
| 15 |
itid_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, |
| 16 |
itid_itemid BLOB NOT NULL |
| 17 |
); |
| 18 |
|
| 19 |
CREATE UNIQUE INDEX itid_itemid ON /*_*/discussiontools_item_ids (itid_itemid); |
| 20 |
|
| 21 |
|
| 22 |
CREATE TABLE /*_*/discussiontools_item_pages ( |
| 23 |
itp_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, |
| 24 |
itp_items_id INTEGER UNSIGNED NOT NULL, |
| 25 |
itp_page_id BIGINT UNSIGNED NOT NULL, |
| 26 |
itp_oldest_revision_id BIGINT UNSIGNED NOT NULL, |
| 27 |
itp_newest_revision_id BIGINT UNSIGNED NOT NULL |
| 28 |
); |
| 29 |
|
| 30 |
CREATE UNIQUE INDEX itp_items_id_page_id ON /*_*/discussiontools_item_pages (itp_items_id, itp_page_id); |
| 31 |
|
| 32 |
CREATE UNIQUE INDEX itp_items_id_newest_revision_id ON /*_*/discussiontools_item_pages ( |
| 33 |
itp_items_id, itp_newest_revision_id |
| 34 |
); |
| 35 |
|
| 36 |
|
| 37 |
CREATE TABLE /*_*/discussiontools_item_revisions ( |
| 38 |
itr_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, |
| 39 |
itr_itemid_id INTEGER NOT NULL, itr_revision_id BIGINT UNSIGNED NOT NULL, |
| 40 |
itr_items_id INTEGER NOT NULL, itr_parent_id INTEGER DEFAULT NULL, |
| 41 |
itr_transcludedfrom BIGINT UNSIGNED DEFAULT NULL, |
| 42 |
itr_level SMALLINT NOT NULL, itr_headinglevel SMALLINT DEFAULT NULL |
| 43 |
); |
| 44 |
|
| 45 |
CREATE INDEX itr_revision_id ON /*_*/discussiontools_item_revisions (itr_revision_id); |
| 46 |
|
| 47 |
CREATE UNIQUE INDEX itr_itemid_id_revision_id ON /*_*/discussiontools_item_revisions (itr_itemid_id, itr_revision_id); |