pluginpal/strapi-plugin-config-sync

One time imports (db seeding)

Closed this issue · 1 comments

Feature request

Summary

It would be neat if the plugin would allow for one-time-imports. This process would be completely seperated from the config syncing and could be used to seed data on remote env's.

Why is it needed?

Currently this plugin works for syncing config data. Though if you were to use the plugin to sync content you would run into trouble if you edit the content on production. Because on the next import you would lose the changes that are made.

Suggested solution(s)

I would like to have this be a process that is seperated from the config syncing. So it won't affect the functionality of the plugin as it is.

We would have an extra folder (or folders) that holds the JSON files for the data that is to be used for seeding. When we deploy these files we can import them by using a new command (yarn cs seed) which will write the data from the JSON files into the db.
As soon as the file is imported the job is done. The next time the seed command is ran the plugin will not try to overwrite the data in the db.

This feature will allow you to migrate content data through one-time imports as apposed to full on data sync as currently is the only option with this plugin.

Related issue(s)/PR(s)

N.A.

I've decided to not build this feature as Strapi offers a full on data transfer system since recently and that is pretty much exactly what this feature was suppose to be.