diff options
author | Ammarpad <ammarpad@yahoo.com> | 2021-03-22 15:42:19 +0100 |
---|---|---|
committer | Ammarpad <ammarpad@yahoo.com> | 2021-04-30 06:58:25 +0100 |
commit | d9400049cf9ea38a74830fefb21c8abd73f91fab (patch) | |
tree | b269c964de0415df654ba336f8253e7f7cae4de7 /maintenance/sqlite/archives | |
parent | 39d2f55d0496691272005e95c49c18bd6cb4d9ca (diff) | |
download | mediawikicore-d9400049cf9ea38a74830fefb21c8abd73f91fab.tar.gz mediawikicore-d9400049cf9ea38a74830fefb21c8abd73f91fab.zip |
Rename `page_timestamp` revision index
Rename to `rev_page_timestamp`
Bug: T270033
Depends-On: I16fc273b14e7f4b00e8c31ec1ed7712149aafe37
Change-Id: I93fcfb3caf8c6bd7f9e46921065b751c23571ae1
Diffstat (limited to 'maintenance/sqlite/archives')
-rw-r--r-- | maintenance/sqlite/archives/patch-revision-rename-index.sql | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/maintenance/sqlite/archives/patch-revision-rename-index.sql b/maintenance/sqlite/archives/patch-revision-rename-index.sql new file mode 100644 index 000000000000..b21293fd2a43 --- /dev/null +++ b/maintenance/sqlite/archives/patch-revision-rename-index.sql @@ -0,0 +1,23 @@ +-- This file is automatically generated using maintenance/generateSchemaChangeSql.php. +-- Source: maintenance/abstractSchemaChanges/patch-revision-rename-index.json +-- Do not modify this file directly. +-- See https://www.mediawiki.org/wiki/Manual:Schema_changes +DROP INDEX rev_page_id; +DROP INDEX rev_timestamp; +DROP INDEX page_timestamp; +DROP INDEX rev_actor_timestamp; +DROP INDEX rev_page_actor_timestamp; +CREATE TEMPORARY TABLE /*_*/__temp__revision AS +SELECT rev_id, rev_page, rev_comment_id, rev_actor, rev_timestamp, rev_minor_edit, rev_deleted, rev_len, rev_parent_id, rev_sha1 +FROM /*_*/revision; +DROP TABLE /*_*/revision; +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 DEFAULT '' 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 ); +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 ) +SELECT rev_id, rev_page, rev_comment_id, rev_actor, rev_timestamp, rev_minor_edit, rev_deleted, rev_len, rev_parent_id, rev_sha1 +FROM /*_*/__temp__revision; +DROP TABLE /*_*/__temp__revision; +CREATE INDEX rev_page_id ON /*_*/revision (rev_page, rev_id); +CREATE INDEX rev_timestamp ON /*_*/revision (rev_timestamp); +CREATE INDEX rev_actor_timestamp ON /*_*/revision (rev_actor, rev_timestamp, rev_id); +CREATE INDEX rev_page_actor_timestamp ON /*_*/revision ( rev_page, rev_actor, rev_timestamp ); +CREATE INDEX rev_page_timestamp ON /*_*/revision (rev_page, rev_timestamp);
\ No newline at end of file |