| 1 |
-- This file is automatically generated using maintenance/generateSchemaSql.php. |
| 2 |
-- Source: sql/tables.json |
| 3 |
-- Do not modify this file directly. |
| 4 |
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes |
| 5 |
CREATE TABLE /*_*/echo_event ( |
| 6 |
event_id INT UNSIGNED AUTO_INCREMENT NOT NULL, |
| 7 |
event_type VARBINARY(64) NOT NULL, |
| 8 |
event_variant VARBINARY(64) DEFAULT NULL, |
| 9 |
event_agent_id INT UNSIGNED DEFAULT NULL, |
| 10 |
event_agent_ip VARBINARY(39) DEFAULT NULL, |
| 11 |
event_extra BLOB DEFAULT NULL, |
| 12 |
event_page_id INT UNSIGNED DEFAULT NULL, |
| 13 |
event_deleted TINYINT UNSIGNED DEFAULT 0 NOT NULL, |
| 14 |
INDEX echo_event_type (event_type), |
| 15 |
INDEX echo_event_page_id (event_page_id), |
| 16 |
PRIMARY KEY(event_id) |
| 17 |
) /*$wgDBTableOptions*/; |
| 18 |
|
| 19 |
|
| 20 |
CREATE TABLE /*_*/echo_notification ( |
| 21 |
notification_event INT UNSIGNED NOT NULL, |
| 22 |
notification_user INT UNSIGNED NOT NULL, |
| 23 |
notification_timestamp BINARY(14) NOT NULL, |
| 24 |
notification_read_timestamp BINARY(14) DEFAULT NULL, |
| 25 |
notification_bundle_hash VARBINARY(32) NOT NULL, |
| 26 |
INDEX echo_user_timestamp ( |
| 27 |
notification_user, notification_timestamp |
| 28 |
), |
| 29 |
INDEX echo_notification_event (notification_event), |
| 30 |
INDEX echo_notification_user_read_timestamp ( |
| 31 |
notification_user, notification_read_timestamp |
| 32 |
), |
| 33 |
PRIMARY KEY( |
| 34 |
notification_user, notification_event |
| 35 |
) |
| 36 |
) /*$wgDBTableOptions*/; |
| 37 |
|
| 38 |
|
| 39 |
CREATE TABLE /*_*/echo_email_batch ( |
| 40 |
eeb_id INT UNSIGNED AUTO_INCREMENT NOT NULL, |
| 41 |
eeb_user_id INT UNSIGNED NOT NULL, |
| 42 |
eeb_event_priority TINYINT UNSIGNED DEFAULT 10 NOT NULL, |
| 43 |
eeb_event_id INT UNSIGNED NOT NULL, |
| 44 |
eeb_event_hash VARBINARY(32) NOT NULL, |
| 45 |
UNIQUE INDEX echo_email_batch_user_event (eeb_user_id, eeb_event_id), |
| 46 |
INDEX echo_email_batch_user_hash_priority ( |
| 47 |
eeb_user_id, eeb_event_hash, eeb_event_priority |
| 48 |
), |
| 49 |
PRIMARY KEY(eeb_id) |
| 50 |
) /*$wgDBTableOptions*/; |
| 51 |
|
| 52 |
|
| 53 |
CREATE TABLE /*_*/echo_target_page ( |
| 54 |
etp_id INT UNSIGNED AUTO_INCREMENT NOT NULL, |
| 55 |
etp_page INT UNSIGNED DEFAULT 0 NOT NULL, |
| 56 |
etp_event INT UNSIGNED DEFAULT 0 NOT NULL, |
| 57 |
INDEX echo_target_page_event (etp_event), |
| 58 |
INDEX echo_target_page_page_event (etp_page, etp_event), |
| 59 |
PRIMARY KEY(etp_id) |
| 60 |
) /*$wgDBTableOptions*/; |
| 61 |
|
| 62 |
|
| 63 |
CREATE TABLE /*_*/echo_push_provider ( |
| 64 |
epp_id TINYINT UNSIGNED AUTO_INCREMENT NOT NULL, |
| 65 |
epp_name TINYBLOB NOT NULL, |
| 66 |
PRIMARY KEY(epp_id) |
| 67 |
) /*$wgDBTableOptions*/; |
| 68 |
|
| 69 |
|
| 70 |
CREATE TABLE /*_*/echo_push_subscription ( |
| 71 |
eps_id INT UNSIGNED AUTO_INCREMENT NOT NULL, |
| 72 |
eps_user INT UNSIGNED NOT NULL, |
| 73 |
eps_token BLOB NOT NULL, |
| 74 |
eps_token_sha256 CHAR(64) NOT NULL, |
| 75 |
eps_provider TINYINT UNSIGNED NOT NULL, |
| 76 |
eps_updated TIMESTAMP NOT NULL, |
| 77 |
eps_data BLOB DEFAULT NULL, |
| 78 |
eps_topic TINYINT UNSIGNED DEFAULT NULL, |
| 79 |
UNIQUE INDEX eps_token_sha256 (eps_token_sha256), |
| 80 |
INDEX eps_provider (eps_provider), |
| 81 |
INDEX eps_topic (eps_topic), |
| 82 |
INDEX eps_user (eps_user), |
| 83 |
INDEX eps_token ( |
| 84 |
eps_token(10) |
| 85 |
), |
| 86 |
PRIMARY KEY(eps_id) |
| 87 |
) /*$wgDBTableOptions*/; |
| 88 |
|
| 89 |
|
| 90 |
CREATE TABLE /*_*/echo_push_topic ( |
| 91 |
ept_id TINYINT UNSIGNED AUTO_INCREMENT NOT NULL, |
| 92 |
ept_text TINYBLOB NOT NULL, |
| 93 |
PRIMARY KEY(ept_id) |
| 94 |
) /*$wgDBTableOptions*/; |