Update.php Flow - Error: 1 index flow_wiki_ref_idx_v2 already exists with SQLITE
Closed, ResolvedPublic

Description

Running update.php once to install Flow works fine with SQLITE.
If I then run update.php again I get:

...flow_revision table already exists.
...have rev_last_edit_id field in flow_revision table.
...have rev_mod_reason field in flow_revision table.
...flow_summary_revision table does not exist, skipping modify field patch.
...rev_comment field does not exist in flow_revision table, skipping modify field patch.
...workflow_id in table flow_workflow already modified by patch C:\git\gerrit\mediawiki\extensions\Flow/db_patches/patch-88bit_uuids.sqlite.sql.
...have workflow_type field in flow_workflow table.
...workflow_user_id field does not exist in flow_workflow table, skipping modify field patch.
...index flow_workflow_lookup already set on flow_workflow table.
...index flow_topic_list_topic_id already set on flow_topic_list table.
...rev_change_type in table flow_revision already modified by patch C:\git\gerrit\mediawiki\extensions\Flow/db_patches/patch-rev_change_type_update.sql.
...rc_source in table recentchanges already modified by patch C:\git\gerrit\mediawiki\extensions\Flow/db_patches/patch-rc_source.sql.
...rev_change_type in table flow_revision already modified by patch C:\git\gerrit\mediawiki\extensions\Flow/db_patches/patch-censor_to_suppress.sql.
...have rev_user_ip field in flow_revision table.
...have rev_user_wiki field in flow_revision table.
...index flow_tree_descendant_rev_id already set on flow_tree_revision table.
...flow_tree_revision table does not contain tree_orig_create_time field.
...index flow_revision_user already set on flow_revision table.
...rev_user_ip in table flow_revision already modified by patch C:\git\gerrit\mediawiki\extensions\Flow/db_patches/patch-revision_user_ip.sql.
...have rev_type_id field in flow_revision table.
...flow_ext_ref table already exists.
...flow_definition doesn't exist.
...flow_workflow table does not contain workflow_user_ip field.
...have rev_content_length field in flow_revision table.
...flow_ext_ref_pk key doesn't exist.
...index flow_workflow_update_timestamp already set on flow_workflow table.
...have ref_src_wiki field in flow_wiki_ref table.
...have ref_id field in flow_wiki_ref table.
...flow_revision table does not contain rev_user_text field.
Adding index PRIMARY to table flow_wiki_ref ...A database query error has occurred.
Query: CREATE INDEX flow_wiki_ref_idx_v2 ON flow_wiki_ref
 (ref_src_wiki, ref_src_namespace, ref_src_title, ref_type, ref_target_namespace, ref_target_title, ref_src_object_type, ref_src_object_id)

Function: DatabaseBase::sourceFile( C:\git\gerrit\mediawiki\extensions\Flow/db_patches/patch-ref_id-phase2.sqlite.sql )
Error: 1 index flow_wiki_ref_idx_v2 already exists

Backtrace:
#0 C:\git\gerrit\mediawiki\includes\db\Database.php(897): DatabaseBase->reportQueryError('index flow_wiki...', 1, 'CREATE INDEX fl...', 'DatabaseBase::s...', false)
#1 C:\git\gerrit\mediawiki\includes\db\Database.php(3044): DatabaseBase->query('CREATE INDEX fl...', 'DatabaseBase::s...')
#2 C:\git\gerrit\mediawiki\includes\db\Database.php(2965): DatabaseBase->sourceStream(Resource id #669, false, false, 'DatabaseBase::s...', false)
#3 C:\git\gerrit\mediawiki\includes\installer\DatabaseUpdater.php(669): DatabaseBase->sourceFile('C:\\git\\gerrit\\m...')
#4 C:\git\gerrit\mediawiki\includes\installer\DatabaseUpdater.php(742): DatabaseUpdater->applyPatch('C:\\git\\gerrit\\m...', true, 'Adding index PR...')
#5 [internal function]: DatabaseUpdater->addIndex('flow_wiki_ref', 'PRIMARY', 'C:\\git\\gerrit\\m...', true)
#6 C:\git\gerrit\mediawiki\includes\installer\DatabaseUpdater.php(455): call_user_func_array(Array, Array)
#7 C:\git\gerrit\mediawiki\includes\installer\DatabaseUpdater.php(420): DatabaseUpdater->runUpdates(Array, true)
#8 C:\git\gerrit\mediawiki\maintenance\update.php(169): DatabaseUpdater->doUpdates(Array)
#9 C:\git\gerrit\mediawiki\maintenance\doMaintenance.php(103): UpdateMediaWiki->execute()
#10 C:\git\gerrit\mediawiki\maintenance\update.php(214): require_once('C:\\git\\gerrit\\m...')
#11 {main}
Addshore created this task.Feb 11 2016, 9:41 AM
Addshore updated the task description. (Show Details)
Addshore raised the priority of this task from to Needs Triage.
Addshore added a subscriber: Addshore.
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptFeb 11 2016, 9:41 AM
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald Transcript
Addshore updated the task description. (Show Details)Feb 11 2016, 11:40 AM
Addshore set Security to None.
Addshore renamed this task from Update.php Flow - Error: 1 index flow_wiki_ref_idx_v2 already exists to Update.php Flow - Error: 1 index flow_wiki_ref_idx_v2 already exists with SQLITE.

Change 277990 had a related patch set uploaded (by Matthias Mullie):
Fix SQLite update issues because of duplicate indexes

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

Change 277990 merged by jenkins-bot:
Fix SQLite update issues because of duplicate indexes

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

Addshore closed this task as Resolved.Mar 17 2016, 4:37 PM

Merged!