Switch Solution Layers without losing data #51
JanKrupicka
started this conversation in
Troubleshooting Guide
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It might happen in your life, that the order of Model solutions might be switched. OH NO. What should you do?
Well you can try to delete the solution and deploy it again. Which would swap the order, however you are on a production environment and you would loose your data. So what can you do?
It's actually quite simple. You need to do a solution upgrade using two solutions instead of one.
Lets say you have 2 solutions. Both are model solutions so you can't delete either of them. Lets call them pat_managed and mat_managed. They both reference the entity Account and contain custom columns. pat_managed is order 1 and mat_managed is order 2. You want to get pat_managed to order 2 and mat_managed to order 1 without deleting them.
First take pat_managed and rename its schemaname to pat1_managed deploy this solution. Then delete the original pat_managed solution if there are no dependencies to other solutions it will delete and your data will stay in the pat1_managed which is now effectively order 2 solution.
You however liked the name pat_managed because you use ALM practices for your deployment and have an internal name convetion for solutions. So you need it to be named pat_managed. Just take the original solution called pat_managed and deploy it again and delete pat1_managed.
And voala your solutions will swap places without loosing any data.
DISCLAIMER: We weren't able to deploy the renamed solution throught the new UI it threw an exception. So this can be only done through the legacy UI solution explorer.
Beta Was this translation helpful? Give feedback.
All reactions