Have you ever had to debug an issue at a client site and eventually you think it might be due to missing some schema patches but no way to know for sure?
If you build into your app a way to output the details returned by Schema::getUserAppliedPatches then you can get your users to send you these details via email and then confirm if all the expected patches have been applied. As the one call outputs the results for all schemas in that system, regardless of which schema object context you use to execute the method, I coded our 'debug diagnostic' form to use the currentSchema keyword as per the following.
self.txtPatchesLoaded.text := currentSchema.getUserAppliedPatches();
Here's what's returned from a brand new system I just installed and then loaded two of my schemas and the JADE Report Writer schema. I did add an extra blank line and some bold text to make where each schema section starts more obvious:
BeeJayWebServiceConsumer Patches:
Schema,C:\JadeStuff\BeeJayWebServiceConsumer.scm,20.0.02,2022/03/16 12:35:13
DDB,C:\JadeStuff\BeeJayWebServiceConsumer.ddb,20.0.02,2022/03/16 12:35:13
BeeJayWebServiceProvider Patches:
Schema,C:\JadeStuff\BeeJayWebServiceProvider.scm,20.0.02,2022/03/16 12:35:00
DDB,C:\JadeStuff\BeeJayWebServiceProvider.ddb,20.0.02,2022/03/16 12:35:00
JadeReportWriterSchema Patches:
Schema,C:\JadeStuff\hotfix_18_0_01_042_schemas\JadeReportWriterSchema_18_0_01_042.scm,18.0.01,2022/03/16 12:35:27
DDB,C:\JadeStuff\hotfix_18_0_01_042_schemas\JadeReportWriterSchema_18_0_01_042.ddb,20.0.02,2022/03/16 12:35:37
This of course assumes you name your patches with suitably unique file names to know which scm/mth/cls/etc file was being loaded at any given point. Hope that helps.
Cheers,
BeeJay.
Any thoughts expressed are my own and in no way reflect the views of my employer. If this reply includes any sample code, or other changes such as registry key settings, I believe that this information is accurate and reliable and has been prepared with care but give no guarantee that the sample code or suggested changes will be free of defects or errors. No responsibility or liability, financial or otherwise, is accepted for any consequences arising out of the use of any sample code, registry changes, etc, including loss of profits, indirect, special or consequential losses or damages.