Index: branches/liquidthreads/maintenance/lqt.sql |
— | — | @@ -13,6 +13,25 @@ |
14 | 14 | INDEX thread_timestamp (thread_timestamp) |
15 | 15 | ) TYPE=InnoDB; |
16 | 16 | |
| 17 | +CREATE TABLE /*$wgDBprefix*/historical_thread ( |
| 18 | + -- Note that many hthreads can share an id, which is the same as the id |
| 19 | + -- of the live thread. It is only the id/revision combo which must be unique. |
| 20 | + hthread_id int(8) unsigned NOT NULL, |
| 21 | + hthread_revision int(8) unsigned NOT NULL, |
| 22 | + hthread_contents TEXT NOT NULL, |
| 23 | + PRIMARY KEY hthread_id_revision (hthread_id, hthread_revision) |
| 24 | +) TYPE=InnoDB; |
| 25 | + |
| 26 | +-- Because hthreads are only stored one per root, this lists |
| 27 | +-- the subthreads that can be found within each one. |
| 28 | +CREATE TABLE /*$wgDBprefix*/hthread_contents { |
| 29 | + htcontents_child int(8) unsigned NOT NULL, |
| 30 | + htcontents_hthread int(8) unsigned NOT NULL, |
| 31 | + htcontents_rev_start int(8) unsigned NOT NULL, |
| 32 | + htcontents_rev_end int(8) unsigned NULL, |
| 33 | + PRIMARY KEY |
| 34 | +} |
| 35 | + |
17 | 36 | /* |
18 | 37 | old_superthread and old_article are mutually exclusive. |
19 | 38 | New position is recorded either in the text movement or in the |