jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/386705 )
Change subject: Added drop of cargo_tables_template_id DB index ...................................................................... Added drop of cargo_tables_template_id DB index Unnecessary, and now causes problems with replacement tables. Change-Id: Iec10518689fc30aee19087beac32c231cafe1e3d --- M Cargo.hooks.php M sql/Cargo.mssql.sql M sql/Cargo.pg.sql M sql/Cargo.sql A sql/cargo_tables.patch.index_template_id.mssql.sql A sql/cargo_tables.patch.index_template_id.pg.sql A sql/cargo_tables.patch.index_template_id.sql 7 files changed, 7 insertions(+), 3 deletions(-) Approvals: Yaron Koren: Looks good to me, approved jenkins-bot: Verified diff --git a/Cargo.hooks.php b/Cargo.hooks.php index 1f0adc8..54cb1d3 100755 --- a/Cargo.hooks.php +++ b/Cargo.hooks.php @@ -375,10 +375,13 @@ public static function cargoSchemaUpdates( DatabaseUpdater $updater ) { if ( $updater->getDB()->getType() == 'mysql' || $updater->getDB()->getType() == 'sqlite' ) { $updater->addExtensionField( 'cargo_tables', 'field_helper_tables', __DIR__ . '/sql/cargo_tables.patch.field_helper_tables.sql', true ); + $updater->dropExtensionIndex( 'cargo_tables', 'cargo_tables_template_id', __DIR__ . '/sql/cargo_tables.patch.index_template_id.sql', true ); } elseif ( $updater->getDB()->getType() == 'postgres' ) { $updater->addExtensionField( 'cargo_tables', 'field_helper_tables', __DIR__ . '/sql/cargo_tables.patch.field_helper_tables.pg.sql', true ); + $updater->dropExtensionIndex( 'cargo_tables', 'cargo_tables_template_id', __DIR__ . '/sql/cargo_tables.patch.index_template_id.pg.sql', true ); } elseif ( $updater->getDB()->getType() == 'mssql' ) { $updater->addExtensionField( 'cargo_tables', 'field_helper_tables', __DIR__ . '/sql/cargo_tables.patch.field_helper_tables.mssql.sql', true ); + $updater->dropExtensionIndex( 'cargo_tables', 'cargo_tables_template_id', __DIR__ . '/sql/cargo_tables.patch.index_template_id.mssql.sql', true ); } return true; } diff --git a/sql/Cargo.mssql.sql b/sql/Cargo.mssql.sql index 6d820d9..3b12f48 100644 --- a/sql/Cargo.mssql.sql +++ b/sql/Cargo.mssql.sql @@ -8,7 +8,6 @@ table_schema varchar(max) NOT NULL ) /*$wgDBTableOptions*/; -CREATE UNIQUE INDEX cargo_tables_template_id ON /*_*/cargo_tables (template_id); CREATE UNIQUE INDEX cargo_tables_main_table ON /*_*/cargo_tables (main_table); CREATE TABLE /*_*/cargo_pages ( diff --git a/sql/Cargo.pg.sql b/sql/Cargo.pg.sql index 81ecc39..f6bfab1 100644 --- a/sql/Cargo.pg.sql +++ b/sql/Cargo.pg.sql @@ -11,7 +11,6 @@ table_schema TEXT NOT NULL ); -CREATE UNIQUE INDEX cargo_tables_template_id ON cargo_tables (template_id); CREATE UNIQUE INDEX cargo_tables_main_table ON cargo_tables (main_table); CREATE SEQUENCE cargo_pages_page_id_seq; diff --git a/sql/Cargo.sql b/sql/Cargo.sql index 34720b5..b0c7e41 100644 --- a/sql/Cargo.sql +++ b/sql/Cargo.sql @@ -6,7 +6,6 @@ table_schema text NOT NULL ) /*$wgDBTableOptions*/; -CREATE UNIQUE INDEX cargo_tables_template_id ON /*_*/cargo_tables (template_id); CREATE UNIQUE INDEX cargo_tables_main_table ON /*_*/cargo_tables (main_table); CREATE TABLE /*_*/cargo_pages ( diff --git a/sql/cargo_tables.patch.index_template_id.mssql.sql b/sql/cargo_tables.patch.index_template_id.mssql.sql new file mode 100644 index 0000000..4dbf345 --- /dev/null +++ b/sql/cargo_tables.patch.index_template_id.mssql.sql @@ -0,0 +1 @@ +DROP INDEX cargo_tables.cargo_tables_template_id; \ No newline at end of file diff --git a/sql/cargo_tables.patch.index_template_id.pg.sql b/sql/cargo_tables.patch.index_template_id.pg.sql new file mode 100644 index 0000000..5d4118d --- /dev/null +++ b/sql/cargo_tables.patch.index_template_id.pg.sql @@ -0,0 +1 @@ +DROP INDEX cargo_tables_template_id; \ No newline at end of file diff --git a/sql/cargo_tables.patch.index_template_id.sql b/sql/cargo_tables.patch.index_template_id.sql new file mode 100644 index 0000000..8f4ac8f --- /dev/null +++ b/sql/cargo_tables.patch.index_template_id.sql @@ -0,0 +1,2 @@ +ALTER TABLE /*_*/cargo_tables +DROP INDEX cargo_tables_template_id; \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/386705 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iec10518689fc30aee19087beac32c231cafe1e3d Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron Koren <yaro...@gmail.com> Gerrit-Reviewer: Yaron Koren <yaro...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits