mirror of
https://github.com/grocy/grocy.git
synced 2025-04-30 10:05:45 +00:00
Enforce product barcodes to be unique (references #1205)
This commit is contained in:
parent
2aca551692
commit
4555bf3b63
@ -1,9 +1,21 @@
|
|||||||
- Fixed that tracking chores with "Done by" a different user was not possible
|
### Stock improvements/fixes
|
||||||
|
- Product barcodes are now enforced to be unique across products
|
||||||
- Fixed that editing stock entries was not possible
|
- Fixed that editing stock entries was not possible
|
||||||
- Fixed that shopping list prints had a grey background (thanks @Forceu)
|
|
||||||
- Improved/fixed the form validation on the shopping list item page (thanks @Forceu)
|
|
||||||
- Fixed that consuming with Scan Mode was not possible
|
- Fixed that consuming with Scan Mode was not possible
|
||||||
- Fixed that the current stock total value (header of the stock overview page) didn't include decimal amounts (thanks @Ape)
|
- Fixed that the current stock total value (header of the stock overview page) didn't include decimal amounts (thanks @Ape)
|
||||||
- Some night mode style improvements (thanks @BlizzWave and @KTibow)
|
|
||||||
|
### Shopping list fixes
|
||||||
|
- Fixed that shopping list prints had a grey background (thanks @Forceu)
|
||||||
|
- Fixed the form validation on the shopping list item page (thanks @Forceu)
|
||||||
|
|
||||||
|
### Recipe improvements
|
||||||
- Recipe printing improvements (thanks @Ape)
|
- Recipe printing improvements (thanks @Ape)
|
||||||
|
|
||||||
|
### Chores fixes
|
||||||
|
- Fixed that tracking chores with "Done by" a different user was not possible
|
||||||
|
|
||||||
|
### General & other improvements
|
||||||
|
- Some night mode style improvements (thanks @BlizzWave and @KTibow)
|
||||||
|
|
||||||
|
### API fixes
|
||||||
- Fixed that due soon products with `due_type` = "Expiration date" were missing in `due_products` of the `/stock/volatile` endpoint
|
- Fixed that due soon products with `due_type` = "Expiration date" were missing in `due_products` of the `/stock/volatile` endpoint
|
||||||
|
13
migrations/0128.sql
Normal file
13
migrations/0128.sql
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
-- Duplicate product barcodes were most probably not created on purpose,
|
||||||
|
-- so just keep the newer one for any duplicates
|
||||||
|
DELETE FROM product_barcodes
|
||||||
|
WHERE id IN (
|
||||||
|
SELECT MIN(id)
|
||||||
|
FROM product_barcodes
|
||||||
|
GROUP BY barcode
|
||||||
|
HAVING COUNT(*) > 1
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE UNIQUE INDEX ix_product_barcodes ON product_barcodes (
|
||||||
|
barcode
|
||||||
|
);
|
Loading…
x
Reference in New Issue
Block a user