Voyager: SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name >> When saving changes in "/admin/database/categories/edit" form

Created on 9 Jan 2017  路  8Comments  路  Source: the-control-group/voyager

  • Laravel Version: 5.3
  • Voyager Version: 0.10.8
  • PHP Version: 5.6

Getting this error:

ueryException in Connection.php line 770: SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'categories_slug_unique' (SQL: alter tablecategoriesadd uniquecategories_slug_unique(slug))

bug

Most helpful comment

Sorry, I just found new problem on my PR #518. It's related with enum type. Will continue working on it.

All 8 comments

Check in your database at table categories.

Seem you have more than 1 at fields categories_slug_unique.

Primary key or Unique should be the only one.

Try to change values that. Hope can help you.

@vanloc0301
Thanks, but this didn't help.

You may have duplicate slug name in your categories table.

I think this issue is related with #478 and have been fixed on #518

@handiwijoyo

Is this merged to the latest release? as the problem still exists and not solved.

Sorry, I just found new problem on my PR #518. It's related with enum type. Will continue working on it.

This issue has been fixed on 1.0

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

craigb88 picture craigb88  路  3Comments

TXRRNT picture TXRRNT  路  3Comments

kevinjon27 picture kevinjon27  路  3Comments

winex01 picture winex01  路  3Comments

zzpwestlife picture zzpwestlife  路  3Comments