views_update_6013() in 6.x-3.x and views_update_6014() in 7.x-3.x both add a views_view.core column. When upgrading from drupal 6 to drupal 7 I get this failure notice:

Update #6014
Failed: DatabaseSchemaObjectExistsException: Cannot add field <em class="placeholder">views_view</em>.<em class="placeholder">core</em>: field already exists. in DatabaseSchema_mysql->addField() (line 324 of /usr/home/d7/html/includes/database/mysql/schema.inc).

Comments

merlinofchaos’s picture

Oh I do so love our update system.

dawehner’s picture

We could sync our update functions. But this will not help, because then people might execute it again.
oh

mfb’s picture

I don't get it, why is the equivalent update function 6013 on one branch and 6014 on another? Any reason they're not the same, which would prevent this problem.

dawehner’s picture

At least for the future we could save views_update_6013 = TRUE in d6 and check in d7. What a mess.

dawehner’s picture

Status: Active » Fixed

This was fixed with commit 344b79a646f168f5e8011c548099ec283e645ae7

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

ahimsauzi’s picture

Hi dereine, can you provide more specific data on how to fix that error? I am still having this issue when updating from 6.22 to 7.4. Now I can uninstall views and import all my views one at a time but I suspect that may not resolve this issue...

This is the error I get:
The following updates returned messages
views module
Update #6013

Failed: DatabaseSchemaObjectExistsException: Cannot add field views_view.human_name: field already exists. in DatabaseSchema_mysql->addField() (line 323 of /Users/ahimsauzi/Sites/medium/includes/database/mysql/schema.inc).

ishadakota’s picture

Status: Closed (fixed) » Active

I had the same issue, and I'm not sure why because I upgraded with 7.x-3.0-rc1 - a later version than the commit dereine references in #5 (perhaps, before upgrade I needed to update to the latest 6.x-3.x-dev release?).

In any case, a workaround is to manually delete the "human_name" and "core" fields from the views_views table. When you run a database update, it will recreate those fields again without throwing the error.

Setting to active for attention, in the case that it is not fixed as intended.

dawehner’s picture

@ishadakota
From which version did you updated?

ishadakota’s picture

I updated from 6.x-3.0-alpha3.

dawehner’s picture

I guess if you have updated first to 6.x-3.x-dev and then to 7.x it would have worked better

dawehner’s picture

Status: Active » Fixed

Okay commited a fix which checks for the existence of human_name.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.