We observed from tabVersion
that we are maintaining version for following doctypes which by nature are either Insert Only or Calculated based on some other doctype.
-
Stock Ledger Entry -
Insert Only. No one will ever go and change stock ledger entry by hand. -
General Ledger Entry -
Insert Only. No one will every go and and change ledger entry by hand. -
Bin -
Same as above. This is calculated record and no one will change it by hand.
Having these document versioned creates 1 duplicate record each. In addition to that, in case there is any backdated Sales invoice/Delivery note entry it updates all subsequent Stock and General Ledger entries and also resulting in version record being created.
In our implementation, tabVersion
table is bloated as follows -
Doctype count(*) from tabVersion
Bin 635367
GL Entry 1075113
Stock Ledger Entry 283260
We are planning to disable Versioning for above tables. Wanted to understand from this community if it is worth to disable versioning in core ErpNext codebase for above table. This can be sent as a PR then.