Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4495 Lượt xem

Every time the same database is imported, the seller_ids/id is duplicated. Importing a blank id does no wipe out the data in the system, there is a very big mess in my database now and I do not want to manually delete them one by one for each product, what solution is there?

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Fixed this myself:

#1 - Delete all products #2 - Export all products, find actual last sequence number #3 - Go into PSQL <database>, restart sequence product_product_id_seq, product_template_id_seq, product_supplierinfo_id_seq #4 - Re-import products without external id.

All products are populated properly with only one supplierinfo.

Ảnh đại diện
Huỷ bỏ