pluginpal / strapi-plugin-config-sync

:recycle: CLI & GUI for continuous migration of config data across environments

Home Page:https://www.pluginpal.io/plugin/config-sync

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add 'soft' setting to importOnBootstrap to prevent overwriting of existing changes in DB

BabyDino opened this issue · comments

Originally posted by @BabyDino in #68 (comment)

When we roll out an API we would love to use the importOnBootstrap setting, but we want to prevent existing changed data of being reimported.

One example:

  • We have a table with e-mail templates. In our dev, we export staging/production ready email templates.
  • We'd like to use importOnBootstrap on staging/production, which would be ideal for a first run.
  • Now we change an imported template in staging or production
  • On the next run, importOnBootstrap overrides the customized template with the dev template.

So basically, if the state is Different for a template, we would like to have that entry skipped by importOnBootstrap. We only like to import the state Only in sync dir with importOnBootstrap.

Thanks for creating the seperate issue 🙂

Hi @BabyDino,

I've put up a PR implementing my take on solving the problem you posted.
I've written some instructions in the PR description on how to test the new feature.
Could you test this out in your env and see if it works correctly. :)

Thank you for the PR, we will take a look!