Matthias Mullie has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/115619

Change subject: Fix tree_orig_create_time length
......................................................................

Fix tree_orig_create_time length

It stores a wfTimestampNow(), which is 14 chars

Change-Id: I504b6792cdad85a5f658f11e0f80553396b1d001
---
M Hooks.php
A db_patches/patch-tree_orig_create_time.sql
M flow.sql
3 files changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/19/115619/1

diff --git a/Hooks.php b/Hooks.php
index 27fef73..8ad99db 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -58,6 +58,9 @@
                        $updater->modifyExtensionField( 'flow_revision', 
'rev_comment', "$dir/db_patches/patch-rev_change_type.sql" );
                        // convert 128 bit uuid's into 88bit
                        $updater->modifyExtensionField( 'flow_definition', 
'definition_id', "$dir/db_patches/patch-88bit_uuids.sql" );
+                       // sqlite doesn't support alter table change, but also 
doesn't care about field sized so
+                       // this patch doesn't matter to it.
+                       $updater->modifyExtensionField( 'flow_tree_revision', 
'tree_orig_create_time', "$dir/db_patches/patch-tree_orig_create_time.sql" );
                }
 
                $updater->addExtensionIndex( 'flow_workflow', 
'flow_workflow_lookup', "$dir/db_patches/patch-workflow_lookup_idx.sql" );
diff --git a/db_patches/patch-tree_orig_create_time.sql 
b/db_patches/patch-tree_orig_create_time.sql
new file mode 100644
index 0000000..5d4597e
--- /dev/null
+++ b/db_patches/patch-tree_orig_create_time.sql
@@ -0,0 +1,2 @@
+ALTER TABLE /*_*/flow_tree_revision
+       CHANGE tree_orig_create_time tree_orig_create_time varchar(14) binary 
not null;
diff --git a/flow.sql b/flow.sql
index 1832689..c759d22 100644
--- a/flow.sql
+++ b/flow.sql
@@ -57,8 +57,8 @@
        tree_rev_descendant_id binary(11) not null,
        -- fk to flow_revision
        tree_rev_id binary(11) not null,
-       -- denormalized so we dont need to keep finding the first revision of a 
post
-       tree_orig_create_time varchar(12) binary not null,
+       -- denormalized so we don't need to keep finding the first revision of 
a post
+       tree_orig_create_time varchar(14) binary not null,
        tree_orig_user_id bigint unsigned not null,
        tree_orig_user_ip varbinary(39) default null,
        -- denormalize post parent as well? Prevents an extra query when 
building

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I504b6792cdad85a5f658f11e0f80553396b1d001
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <mmul...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to