2 -- Table for tracking blobs prior to recompression or similar maintenance operations
4 CREATE TABLE /*$wgDBprefix*/blob_tracking (
6 -- This may be zero for orphan or deleted text
7 bt_page
integer not null,
10 -- This may be zero for orphan or deleted text
11 bt_rev_id
integer not null,
14 bt_text_id
integer not null,
17 bt_cluster
varbinary(255),
20 bt_blob_id
integer not null,
22 -- The CGZ content hash, or null
23 bt_cgz_hash
varbinary(255),
25 -- The URL this blob is to be moved to
26 bt_new_url
varbinary(255),
28 -- True if the text table has been updated to point to bt_new_url
29 bt_moved bool
not null default 0,
31 PRIMARY KEY (bt_rev_id
, bt_text_id
),
33 -- Sort by page for easy CGZ recompression
34 KEY (bt_moved
, bt_page
, bt_rev_id
),
36 -- For fast orphan searches
39 -- Key for determining the revisions using a given blob
40 KEY (bt_cluster
, bt_blob_id
, bt_cgz_hash
)
41 ) /*$wgDBTableOptions*/;
43 -- Tracking table for blob rows that aren't tracked by the text table
44 CREATE TABLE /*$wgDBprefix*/blob_orphans (
45 bo_cluster
varbinary(255),
46 bo_blob_id
integer not null,
48 PRIMARY KEY (bo_cluster
, bo_blob_id
)
49 ) /*$wgDBTableOptions*/;