我们已经准备好将实例部署到生产环境中,目前我正在清理过程中生成的所有演示数据。
我通常按照以下步骤清理主要样本数据:
SSH到服务器
su postgres
psql abc_db_name
delete from stock_pack_operation;
delete from stock_picking;
delete from stock_move;
delete from account_invoice;
delete from account_partial_reconcile;
delete from account_move;
delete from sale_order;
delete from account_payment;
我现在面临的主要问题是在不删除产品的情况下将所有产品数量设置为0。
我需要运行什么查询来设置它以重置它们并从头开始库存?