Question: When upgrade database from 1.9 to 2.0, error message prompted “Invalid Data Definition Language Statement, error message is Violation of PRMIARY KEY constraint … The duplicate key value is (CR Default). Why?
After clicking OK, another message prompted.
Possible Reason:
This is due to the “CR Default” (document format name) is used in version 1.9, and in AutoCount 2.0 there is a new document called Consignment Return which is also using “CR Default” as its document numbering format name. When upgrade to 2.0, the system is unable to generate the document format for Consignment Return as the format name exists (and being used) in the system.
Solution:
1) Login to AutoCount 1.9, change the CR Default name. Go to General Maintenance > Document Numbering Format Maintenance, look for the CR Default format, edit and change to CR Default 1.
2) Should you see error message during the change of document format name, it is because the document format has been assign to voucher format of some of the Payment Methods.
Go to General Maintenance > Payment Method Maintenance, temporary change all Document Numbering Format that assigned with “CR Default” to any other Document Numbering Format.
Go back to the Document Numbering Format Maintenance, now you should be able to edit the document numbering format to CR Default 1.
Go back to Payment Method Maintenance and edit the document format to CR Default 1.
3) Now, you may login to AutoCount Accounting 2.0 again and proceed with database upgrade.
--Source from AutoCount Wiki --