wikimedia/mediawiki-extensions-Wikibase

View on GitHub
repo/sql/sqlite/archives/patch-wb_changes-change_object_id-index.sql

Summary

Maintainability
Test Coverage
-- This file is automatically generated using maintenance/generateSchemaChangeSql.php.
-- Source: extensions/Wikibase/repo/sql/abstractSchemaChanges/patch-wb_changes-change_object_id-index.json
-- Do not modify this file directly.
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes
DROP  INDEX wb_changes_change_time;
DROP  INDEX wb_changes_change_revision_id;
CREATE TEMPORARY TABLE /*_*/__temp__wb_changes AS
SELECT  change_id,  change_type,  change_time,  change_object_id,  change_revision_id,  change_user_id,  change_info
FROM  /*_*/wb_changes;
DROP  TABLE  /*_*/wb_changes;
CREATE TABLE  /*_*/wb_changes (    change_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,    change_type VARCHAR(25) NOT NULL,    change_time BLOB NOT NULL,    change_object_id BLOB NOT NULL,    change_revision_id INTEGER UNSIGNED NOT NULL,    change_user_id INTEGER UNSIGNED NOT NULL,    change_info BLOB NOT NULL  );
INSERT INTO  /*_*/wb_changes (    change_id, change_type, change_time,    change_object_id, change_revision_id,    change_user_id, change_info  )
SELECT  change_id,  change_type,  change_time,  change_object_id,  change_revision_id,  change_user_id,  change_info
FROM  /*_*/__temp__wb_changes;
DROP  TABLE /*_*/__temp__wb_changes;
CREATE INDEX wb_changes_change_time ON  /*_*/wb_changes (change_time);
CREATE INDEX wb_changes_change_revision_id ON  /*_*/wb_changes (change_revision_id);
CREATE INDEX change_object_id ON  /*_*/wb_changes (change_object_id);