Regarding PROD database migration to a test environment, I would like to have your recommendation about which general considerations should we take to avoid any unexpected issue related with PROD data in a test environment like:
1 - Properties
Take prod/local.properties as a reference for the deployment to the test environment
a - Adjust all the prod storefront domains to point to the test environment storefront domain (to be able to access to access the storefront on the new environment)
b - Adjust all the integrations domains to point to its STG environment provided instead PRD (to avoid sending data to external prod ecosystem)
c - Adjust all the properties related with automatic processes like:
d - Adjust environment.id property to have the id of the test environment and not prod value
e - Anything else that you can recommend us?
2 - Steps to execute after deploying the code
2.1 - Update via impex script the database models that depend on some properties values (keys, endpoints, etc. that may be configured on models)
2.2 - Stop all the jobs & processes that could be already running on the database (CREATED, WAITING or RUNNING status)
Regarding this topic specifically I would like to have you help to create something like a groovy script so we can stop/disable everything running on the migrated database (Business processes, tasks, triggers, etc.)
2.3 - Anything else that you can recommend us?
3 - Any other topic that should we take into consideration?