Closed camelskyscraper closed 2 years ago
:wave: @camelskyscraper,
Unfortunately, you have it right. We don't really have a good way to handle that multi-environment setup but I think you are headed down the right path.
When dumping from prod, here are all of the table you should avoid updating (on staging/dev/etc):
keychain, saml_sp_providers, saml_sp_provider_identity, saml_provider_keychain_link
We started building this before the project config was implemented and I think there's room for improvement there with multi-environment. With the upcoming Craft 4.0 I would like to bump the plugin version update some of these enhancement requests but it might not be right away.
Sorry there isn't a better way to handle this for now. I've updated this issue #136 for general multi-environment support.
Thank you for the rapid response and heads up on the keychain
table.
Going to close this out. Let me know if you need anything else with this.
Prepare to be horrified.
I have a staging site and a production site. I would like to be able to move the entire Craft database from staging to production, but this would overwrite the SAML plugin settings and we'd have to set up the Provider pairings again. At least, I assume there is no way around this... please enlighten this savage if I am ignorant about some technique there.
I wonder if it would work to make a copy of the three SAML tables on production (
saml_provider_keychain_link
,saml_sp_provider_identity
,saml_sp_providers
), overwrite the entire database, then overwrite just the SAML tables. In theory I could just overwrite every table EXCEPT the SAML tables. Maybe I'm way off-base from the start.This must be a common problem (having different Provider setups on staging and production) that other people solve more elegantly than I am describing. Maybe I am wrong that we even need different Provider setups for different environments? It would be relieving to find out that I am starting from a faulty premise.
I realize it's a stretch to call this a plug-in "issue"... sorry if I am posting this in the wrong place.
Thank you for your attention!