| 1 |
-- This file is automatically generated using maintenance/generateSchemaChangeSql.php. |
| 2 |
-- Source: maintenance/abstractSchemaChanges/patch-drop-rev_page_id.json |
| 3 |
-- Do not modify this file directly. |
| 4 |
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes |
| 5 |
DROP INDEX rev_page_id; |
| 6 |
DROP INDEX rev_timestamp; |
| 7 |
DROP INDEX rev_page_timestamp; |
| 8 |
DROP INDEX rev_actor_timestamp; |
| 9 |
DROP INDEX rev_page_actor_timestamp; |
| 10 |
CREATE TEMPORARY TABLE /*_*/__temp__revision AS |
| 11 |
SELECT rev_id, rev_page, rev_comment_id, rev_actor, rev_timestamp, rev_minor_edit, rev_deleted, rev_len, rev_parent_id, rev_sha1 |
| 12 |
FROM /*_*/revision; |
| 13 |
DROP TABLE /*_*/revision; |
| 14 |
CREATE TABLE /*_*/revision ( rev_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, rev_page INTEGER UNSIGNED NOT NULL, rev_comment_id BIGINT UNSIGNED DEFAULT 0 NOT NULL, rev_actor BIGINT UNSIGNED DEFAULT 0 NOT NULL, rev_timestamp BLOB NOT NULL, rev_minor_edit SMALLINT UNSIGNED DEFAULT 0 NOT NULL, rev_deleted SMALLINT UNSIGNED DEFAULT 0 NOT NULL, rev_len INTEGER UNSIGNED DEFAULT NULL, rev_parent_id INTEGER UNSIGNED DEFAULT NULL, rev_sha1 BLOB DEFAULT '' NOT NULL ); |
| 15 |
INSERT INTO /*_*/revision ( rev_id, rev_page, rev_comment_id, rev_actor, rev_timestamp, rev_minor_edit, rev_deleted, rev_len, rev_parent_id, rev_sha1 ) |
| 16 |
SELECT rev_id, rev_page, rev_comment_id, rev_actor, rev_timestamp, rev_minor_edit, rev_deleted, rev_len, rev_parent_id, rev_sha1 |
| 17 |
FROM /*_*/__temp__revision; |
| 18 |
DROP TABLE /*_*/__temp__revision; |
| 19 |
CREATE INDEX rev_timestamp ON /*_*/revision (rev_timestamp); |
| 20 |
CREATE INDEX rev_page_timestamp ON /*_*/revision (rev_page, rev_timestamp); |
| 21 |
CREATE INDEX rev_actor_timestamp ON /*_*/revision (rev_actor, rev_timestamp, rev_id); |
| 22 |
CREATE INDEX rev_page_actor_timestamp ON /*_*/revision ( rev_page, rev_actor, rev_timestamp ); |