- array( 'addPgIndex', 'archive', 'archive_user_text', '(ar_user_text)' ),
- array( 'addPgIndex', 'image', 'img_sha1', '(img_sha1)' ),
- array( 'addPgIndex', 'oldimage', 'oi_sha1', '(oi_sha1)' ),
- array( 'addPgIndex', 'page', 'page_mediawiki_title', '(page_title) WHERE page_namespace = 8' ),
- array( 'addPgIndex', 'pagelinks', 'pagelinks_title', '(pl_title)' ),
- array( 'addPgIndex', 'revision', 'rev_text_id_idx', '(rev_text_id)' ),
- array( 'addPgIndex', 'recentchanges', 'rc_timestamp_bot', '(rc_timestamp) WHERE rc_bot = 0' ),
- array( 'addPgIndex', 'templatelinks', 'templatelinks_from', '(tl_from)' ),
- array( 'addPgIndex', 'watchlist', 'wl_user', '(wl_user)' ),
- array( 'addPgIndex', 'logging', 'logging_user_type_time', '(log_user, log_type, log_timestamp)' ),
- array( 'addPgIndex', 'logging', 'logging_page_id_time', '(log_page,log_timestamp)' ),
- array( 'addPgIndex', 'iwlinks', 'iwl_prefix_title_from', '(iwl_prefix, iwl_title, iwl_from)' ),
-
- array( 'checkOiNameConstraint' ),
- array( 'checkPageDeletedTrigger' ),
- array( 'checkRcCurIdNullable' ),
- array( 'checkPagelinkUniqueIndex' ),
- array( 'checkRevUserFkey' ),
- array( 'checkIpbAdress' ),
- array( 'checkIwlPrefix' ),
+ [ 'addPgIndex', 'archive', 'archive_user_text', '(ar_user_text)' ],
+ [ 'addPgIndex', 'image', 'img_sha1', '(img_sha1)' ],
+ [ 'addPgIndex', 'ipblocks', 'ipb_parent_block_id', '(ipb_parent_block_id)' ],
+ [ 'addPgIndex', 'oldimage', 'oi_sha1', '(oi_sha1)' ],
+ [ 'addPgIndex', 'page', 'page_mediawiki_title', '(page_title) WHERE page_namespace = 8' ],
+ [ 'addPgIndex', 'pagelinks', 'pagelinks_title', '(pl_title)' ],
+ [ 'addPgIndex', 'page_props', 'pp_propname_page', '(pp_propname, pp_page)' ],
+ [ 'addPgIndex', 'revision', 'rev_text_id_idx', '(rev_text_id)' ],
+ [ 'addPgIndex', 'recentchanges', 'rc_timestamp_bot', '(rc_timestamp) WHERE rc_bot = 0' ],
+ [ 'addPgIndex', 'templatelinks', 'templatelinks_from', '(tl_from)' ],
+ [ 'addPgIndex', 'watchlist', 'wl_user', '(wl_user)' ],
+ [ 'addPgIndex', 'watchlist', 'wl_user_notificationtimestamp',
+ '(wl_user, wl_notificationtimestamp)' ],
+ [ 'addPgIndex', 'logging', 'logging_user_type_time',
+ '(log_user, log_type, log_timestamp)' ],
+ [ 'addPgIndex', 'logging', 'logging_page_id_time', '(log_page,log_timestamp)' ],
+ [ 'addPgIndex', 'iwlinks', 'iwl_prefix_from_title', '(iwl_prefix, iwl_from, iwl_title)' ],
+ [ 'addPgIndex', 'iwlinks', 'iwl_prefix_title_from', '(iwl_prefix, iwl_title, iwl_from)' ],
+ [ 'addPgIndex', 'job', 'job_timestamp_idx', '(job_timestamp)' ],
+ [ 'addPgIndex', 'job', 'job_sha1', '(job_sha1)' ],
+ [ 'addPgIndex', 'job', 'job_cmd_token', '(job_cmd, job_token, job_random)' ],
+ [ 'addPgIndex', 'job', 'job_cmd_token_id', '(job_cmd, job_token, job_id)' ],
+ [ 'addPgIndex', 'filearchive', 'fa_sha1', '(fa_sha1)' ],
+ [ 'addPgIndex', 'logging', 'logging_user_text_type_time',
+ '(log_user_text, log_type, log_timestamp)' ],
+ [ 'addPgIndex', 'logging', 'logging_user_text_time', '(log_user_text, log_timestamp)' ],
+
+ [ 'checkIndex', 'pagelink_unique', [
+ [ 'pl_from', 'int4_ops', 'btree', 0 ],
+ [ 'pl_namespace', 'int2_ops', 'btree', 0 ],
+ [ 'pl_title', 'text_ops', 'btree', 0 ],
+ ],
+ 'CREATE UNIQUE INDEX pagelink_unique ON pagelinks (pl_from,pl_namespace,pl_title)' ],
+ [ 'checkIndex', 'cl_sortkey', [
+ [ 'cl_to', 'text_ops', 'btree', 0 ],
+ [ 'cl_sortkey', 'text_ops', 'btree', 0 ],
+ [ 'cl_from', 'int4_ops', 'btree', 0 ],
+ ],
+ 'CREATE INDEX cl_sortkey ON "categorylinks" ' .
+ 'USING "btree" ("cl_to", "cl_sortkey", "cl_from")' ],
+ [ 'checkIndex', 'iwl_prefix_title_from', [
+ [ 'iwl_prefix', 'text_ops', 'btree', 0 ],
+ [ 'iwl_title', 'text_ops', 'btree', 0 ],
+ [ 'iwl_from', 'int4_ops', 'btree', 0 ],
+ ],
+ 'CREATE INDEX iwl_prefix_title_from ON "iwlinks" ' .
+ 'USING "btree" ("iwl_prefix", "iwl_title", "iwl_from")' ],
+ [ 'checkIndex', 'logging_times', [
+ [ 'log_timestamp', 'timestamptz_ops', 'btree', 0 ],
+ ],
+ 'CREATE INDEX "logging_times" ON "logging" USING "btree" ("log_timestamp")' ],
+ [ 'dropIndex', 'oldimage', 'oi_name' ],
+ [ 'checkIndex', 'oi_name_archive_name', [
+ [ 'oi_name', 'text_ops', 'btree', 0 ],
+ [ 'oi_archive_name', 'text_ops', 'btree', 0 ],
+ ],
+ 'CREATE INDEX "oi_name_archive_name" ON "oldimage" ' .
+ 'USING "btree" ("oi_name", "oi_archive_name")' ],
+ [ 'checkIndex', 'oi_name_timestamp', [
+ [ 'oi_name', 'text_ops', 'btree', 0 ],
+ [ 'oi_timestamp', 'timestamptz_ops', 'btree', 0 ],
+ ],
+ 'CREATE INDEX "oi_name_timestamp" ON "oldimage" ' .
+ 'USING "btree" ("oi_name", "oi_timestamp")' ],
+ [ 'checkIndex', 'page_main_title', [
+ [ 'page_title', 'text_pattern_ops', 'btree', 0 ],
+ ],
+ 'CREATE INDEX "page_main_title" ON "page" ' .
+ 'USING "btree" ("page_title" "text_pattern_ops") WHERE ("page_namespace" = 0)' ],
+ [ 'checkIndex', 'page_mediawiki_title', [
+ [ 'page_title', 'text_pattern_ops', 'btree', 0 ],
+ ],
+ 'CREATE INDEX "page_mediawiki_title" ON "page" ' .
+ 'USING "btree" ("page_title" "text_pattern_ops") WHERE ("page_namespace" = 8)' ],
+ [ 'checkIndex', 'page_project_title', [
+ [ 'page_title', 'text_pattern_ops', 'btree', 0 ],
+ ],
+ 'CREATE INDEX "page_project_title" ON "page" ' .
+ 'USING "btree" ("page_title" "text_pattern_ops") ' .
+ 'WHERE ("page_namespace" = 4)' ],
+ [ 'checkIndex', 'page_talk_title', [
+ [ 'page_title', 'text_pattern_ops', 'btree', 0 ],
+ ],
+ 'CREATE INDEX "page_talk_title" ON "page" ' .
+ 'USING "btree" ("page_title" "text_pattern_ops") ' .
+ 'WHERE ("page_namespace" = 1)' ],
+ [ 'checkIndex', 'page_user_title', [
+ [ 'page_title', 'text_pattern_ops', 'btree', 0 ],
+ ],
+ 'CREATE INDEX "page_user_title" ON "page" ' .
+ 'USING "btree" ("page_title" "text_pattern_ops") WHERE ' .
+ '("page_namespace" = 2)' ],
+ [ 'checkIndex', 'page_utalk_title', [
+ [ 'page_title', 'text_pattern_ops', 'btree', 0 ],
+ ],
+ 'CREATE INDEX "page_utalk_title" ON "page" ' .
+ 'USING "btree" ("page_title" "text_pattern_ops") ' .
+ 'WHERE ("page_namespace" = 3)' ],
+ [ 'checkIndex', 'ts2_page_text', [
+ [ 'textvector', 'tsvector_ops', 'gist', 0 ],
+ ],
+ 'CREATE INDEX "ts2_page_text" ON "pagecontent" USING "gist" ("textvector")' ],
+ [ 'checkIndex', 'ts2_page_title', [
+ [ 'titlevector', 'tsvector_ops', 'gist', 0 ],
+ ],
+ 'CREATE INDEX "ts2_page_title" ON "page" USING "gist" ("titlevector")' ],
+
+ [ 'checkOiNameConstraint' ],
+ [ 'checkPageDeletedTrigger' ],
+ [ 'checkRevUserFkey' ],
+ [ 'dropIndex', 'ipblocks', 'ipb_address' ],
+ [ 'checkIndex', 'ipb_address_unique', [
+ [ 'ipb_address', 'text_ops', 'btree', 0 ],
+ [ 'ipb_user', 'int4_ops', 'btree', 0 ],
+ [ 'ipb_auto', 'int2_ops', 'btree', 0 ],
+ [ 'ipb_anon_only', 'int2_ops', 'btree', 0 ],
+ ],
+ 'CREATE UNIQUE INDEX ipb_address_unique ' .
+ 'ON ipblocks (ipb_address,ipb_user,ipb_auto,ipb_anon_only)' ],
+
+ [ 'checkIwlPrefix' ],