qbcore-framework / qb-inventory

Slot Based Inventory System Used With QB-Core :school_satchel:
GNU General Public License v3.0
50 stars 379 forks source link

Fix duplicated inventory #494

Closed MrBolux closed 5 months ago

MrBolux commented 8 months ago

Description

Added UNIQUE CONSTRAINTE on 'plate' of gloveboxitems, 'plate' of trunkitems and 'stash' of stashitems For fix the duplicated inventory

Checklist

Qwerty1Verified commented 8 months ago

https://github.com/qbcore-framework/qb-inventory/blob/c8b7ffb910c41bdff619ac23281bfbe1b927e64b/server/main.lua#L858 ON DUPLICATE KEY UPDATE items = :items should perform an UPDATE operation rather than inserting a new duplicate row. Edit: This doesn't occur due to the key not being unique. I'll look into a fix for existing inventory data

Rtextbook commented 8 months ago

i deleted my tables then ran this btw. and all is better now with this.

github-actions[bot] commented 5 months ago

This PR has had 60 days of inactivity & will close within 7 days