jenkins-bot has submitted this change and it was merged.

Change subject: ref_target should be NOT NULL
......................................................................


ref_target should be NOT NULL

Also tidied up the db patch that made it nullable.

Bug: T122111
Change-Id: I12d39129e86e9cc63d147e0b10a1ef68fe01c1cd
---
M Hooks.php
A db_patches/patch-ref_target_not_null.sql
M db_patches/patch-remove_unique_ref_indices.sql
3 files changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Hooks.php b/Hooks.php
index 6b038f9..7412b6e 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -231,6 +231,7 @@
                $updater->addExtensionIndex( 'flow_workflow', 
'flow_workflow_update_timestamp', 
"$dir/db_patches/patch-flow_workflow_update_timestamp_idx.sql" );
                $updater->addExtensionField( 'flow_wiki_ref', 'ref_src_wiki', 
"$dir/db_patches/patch-reference_wiki.sql" );
                $updater->addExtensionField( 'flow_wiki_ref', 'ref_id', 
"$dir/db_patches/patch-ref_id-phase1.sql" );
+               $updater->modifyExtensionField( 'flow_ext_ref', 'ref_target', 
"$dir/db_patches/patch-ref_target_not_null.sql" );
 
                require_once __DIR__.'/maintenance/FlowUpdateRecentChanges.php';
                $updater->addPostDatabaseUpdateMaintenance( 
'FlowUpdateRecentChanges' );
diff --git a/db_patches/patch-ref_target_not_null.sql 
b/db_patches/patch-ref_target_not_null.sql
new file mode 100644
index 0000000..da88d32
--- /dev/null
+++ b/db_patches/patch-ref_target_not_null.sql
@@ -0,0 +1 @@
+ALTER TABLE /*_*/flow_ext_ref CHANGE ref_target ref_target BLOB NOT NULL;
diff --git a/db_patches/patch-remove_unique_ref_indices.sql 
b/db_patches/patch-remove_unique_ref_indices.sql
index 7a0cc31..60f4518 100644
--- a/db_patches/patch-remove_unique_ref_indices.sql
+++ b/db_patches/patch-remove_unique_ref_indices.sql
@@ -9,7 +9,7 @@
 DROP INDEX /*i*/flow_ext_ref_pk ON /*_*/flow_ext_ref;
 DROP INDEX /*i*/flow_ext_ref_revision ON /*_*/flow_ext_ref;
 
-ALTER TABLE /*_*/flow_ext_ref CHANGE ref_target ref_target BLOB;
+ALTER TABLE /*_*/flow_ext_ref CHANGE ref_target ref_target BLOB NOT NULL;
 
 CREATE INDEX /*i*/flow_ext_ref_idx ON /*_*/flow_ext_ref ( ref_src_namespace, 
ref_src_title, ref_type, ref_target(255), ref_src_object_type, 
ref_src_object_id );
 CREATE INDEX /*i*/flow_ext_ref_revision ON /*_*/flow_ext_ref ( 
ref_src_namespace, ref_src_title, ref_src_object_type, ref_src_object_id, 
ref_type, ref_target(255) );

-- 
To view, visit https://gerrit.wikimedia.org/r/270755
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I12d39129e86e9cc63d147e0b10a1ef68fe01c1cd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Springle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to