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

Change subject: Missing sqlite specific db patch
......................................................................


Missing sqlite specific db patch

Change-Id: I3bdf59920bceead02c04a4632b6102cb63aea5c1
---
A db_patches/patch-summary2header.sqlite.sql
1 file changed, 21 insertions(+), 0 deletions(-)

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



diff --git a/db_patches/patch-summary2header.sqlite.sql 
b/db_patches/patch-summary2header.sqlite.sql
new file mode 100644
index 0000000..5f44751
--- /dev/null
+++ b/db_patches/patch-summary2header.sqlite.sql
@@ -0,0 +1,21 @@
+-- Sqlites alter table statement can NOT change existing columns. The only
+-- option since we want to rename the table and its columns is to recreate
+-- the table and copy the data over
+
+
+CREATE TABLE /*_*/flow_header_revision (
+       header_workflow_id binary(16) not null,
+       header_rev_id binary(16) not null,
+       PRIMARY KEY (header_workflow_id, header_rev_id)
+);
+
+INSERT INTO /*_*/flow_header_revision
+       (header_workflow_id, header_rev_id)
+SELECT
+       summary_workflow_id, summary_rev_id
+FROM
+       /*_*/flow_summary_revision;
+
+DROP TABLE flow_summary_revision;
+
+UPDATE /*_*/flow_revision SET rev_type='header' WHERE rev_type='summary';

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

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

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

Reply via email to