wiki.techinc.nl/maintenance/tables-generated.sql

107 lines
3.4 KiB
MySQL
Raw Normal View History

-- This file is automatically generated using maintenance/generateSchemaSql.php.
-- Source: maintenance/tables.json
-- Do not modify this file directly.
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes
CREATE TABLE /*_*/site_identifiers (
si_type VARBINARY(32) NOT NULL,
si_key VARBINARY(32) NOT NULL,
si_site INT UNSIGNED NOT NULL,
INDEX site_ids_site (si_site),
INDEX site_ids_key (si_key),
PRIMARY KEY(si_type, si_key)
) /*$wgDBTableOptions*/;
CREATE TABLE /*_*/updatelog (
ul_key VARCHAR(255) NOT NULL,
ul_value BLOB DEFAULT NULL,
PRIMARY KEY(ul_key)
) /*$wgDBTableOptions*/;
CREATE TABLE /*_*/actor (
actor_id BIGINT UNSIGNED AUTO_INCREMENT NOT NULL,
actor_user INT UNSIGNED DEFAULT NULL,
actor_name VARBINARY(255) NOT NULL,
UNIQUE INDEX actor_user (actor_user),
UNIQUE INDEX actor_name (actor_name),
PRIMARY KEY(actor_id)
) /*$wgDBTableOptions*/;
CREATE TABLE /*_*/user_former_groups (
ufg_user INT UNSIGNED DEFAULT 0 NOT NULL,
ufg_group VARBINARY(255) DEFAULT '' NOT NULL,
PRIMARY KEY(ufg_user, ufg_group)
) /*$wgDBTableOptions*/;
CREATE TABLE /*_*/bot_passwords (
bp_user INT UNSIGNED NOT NULL,
bp_app_id VARBINARY(32) NOT NULL,
bp_password TINYBLOB NOT NULL,
bp_token BINARY(32) DEFAULT '' NOT NULL,
bp_restrictions BLOB NOT NULL,
bp_grants BLOB NOT NULL,
PRIMARY KEY(bp_user, bp_app_id)
) /*$wgDBTableOptions*/;
CREATE TABLE /*_*/comment (
comment_id BIGINT UNSIGNED AUTO_INCREMENT NOT NULL,
comment_hash INT NOT NULL,
comment_text BLOB NOT NULL,
comment_data BLOB DEFAULT NULL,
INDEX comment_hash (comment_hash),
PRIMARY KEY(comment_id)
) /*$wgDBTableOptions*/;
CREATE TABLE /*_*/slots (
slot_revision_id BIGINT UNSIGNED NOT NULL,
slot_role_id SMALLINT UNSIGNED NOT NULL,
slot_content_id BIGINT UNSIGNED NOT NULL,
slot_origin BIGINT UNSIGNED NOT NULL,
INDEX slot_revision_origin_role (
slot_revision_id, slot_origin, slot_role_id
),
PRIMARY KEY(slot_revision_id, slot_role_id)
) /*$wgDBTableOptions*/;
CREATE TABLE /*_*/site_stats (
ss_row_id INT UNSIGNED NOT NULL,
ss_total_edits BIGINT UNSIGNED DEFAULT NULL,
ss_good_articles BIGINT UNSIGNED DEFAULT NULL,
ss_total_pages BIGINT UNSIGNED DEFAULT NULL,
ss_users BIGINT UNSIGNED DEFAULT NULL,
ss_active_users BIGINT UNSIGNED DEFAULT NULL,
ss_images BIGINT UNSIGNED DEFAULT NULL,
PRIMARY KEY(ss_row_id)
) /*$wgDBTableOptions*/;
CREATE TABLE /*_*/user_properties (
up_user INT UNSIGNED NOT NULL,
up_property VARBINARY(255) NOT NULL,
up_value BLOB DEFAULT NULL,
INDEX user_properties_property (up_property),
PRIMARY KEY(up_user, up_property)
) /*$wgDBTableOptions*/;
CREATE TABLE /*_*/log_search (
ls_field VARBINARY(32) NOT NULL,
ls_value VARCHAR(255) NOT NULL,
ls_log_id INT UNSIGNED DEFAULT 0 NOT NULL,
INDEX ls_log_id (ls_log_id),
PRIMARY KEY(ls_field, ls_value, ls_log_id)
) /*$wgDBTableOptions*/;
CREATE TABLE /*_*/change_tag (
ct_id INT UNSIGNED AUTO_INCREMENT NOT NULL,
ct_rc_id INT UNSIGNED DEFAULT NULL,
ct_log_id INT UNSIGNED DEFAULT NULL,
ct_rev_id INT UNSIGNED DEFAULT NULL,
ct_params BLOB DEFAULT NULL,
ct_tag_id INT UNSIGNED NOT NULL,
UNIQUE INDEX change_tag_rc_tag_id (ct_rc_id, ct_tag_id),
UNIQUE INDEX change_tag_log_tag_id (ct_log_id, ct_tag_id),
UNIQUE INDEX change_tag_rev_tag_id (ct_rev_id, ct_tag_id),
INDEX change_tag_tag_id_id (
ct_tag_id, ct_rc_id, ct_rev_id, ct_log_id
),
PRIMARY KEY(ct_id)
) /*$wgDBTableOptions*/;