I'm going to reply but in a different direction. Yes, this approach might require a DBA (or data structure change).
I'm currently working on a system that has Pricing Calculation rules. These rules can be configured ahead of time to go into effect at a future date. For example, you can schedule 2020 pricing by entering the new calculations with the go-live date of 1/1/2020.
Here is the key question: Is this a feature you should add to your product? By allowing them to schedule their price changes, and not deleting any history, they can get the best of both worlds in seeing what happened and also scheduling what will happen. This would be dependent on a new pricing table per product, and some new maintenance screens.
Worth it?
-----Original Message----- From: ProFox [mailto:profox-bounces@leafe.com] On Behalf Of MB Software Solutions, LLC Sent: Monday, April 22, 2019 3:34 PM To: profox@leafe.com Subject: How best to do an audit trail of changes (EASILY WITHOUT THE NEED FOR A DBA)
VFP9SP2 app, MariaDB 10 (MySQL) backend.
One of my clients asked about a history of price changes. Easy enough to implement programmatically for the few price fields, but then I got to wondering if simply putting code in the ON UPDATE trigger to send the old record to a "history" table would be a more complete (and long term EASIER) solution, whereby my app would query the "history" table for changes.
Your thoughts for tracking price (or other) changes?
tia, --Mike
--- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
_______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/44820f32-921d-b662-45cd-151a705bffa8@... ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious. CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential, proprietary, and/or privileged information protected by law. If you are not the intended recipient, you may not use, copy, or distribute this e-mail message or its attachments. If you believe you have received this e-mail message in error, please contact the sender by reply e-mail and telephone immediately and destroy all copies of the original message.