- Strapi Version: 4.5.4
- Operating System: macOS
- Database: MySQL
- Node Version: 16.19.0
- NPM Version: 8.19.3
- Yarn Version: 1.22.19
Hi there, I am a bit confused about the strapi app git repo. I developed my entire cms locally and integrated it with my Nextjs frontend. Everything is working fine, so I deployed cms to the staging server using git. At the staging server, all is working well. Now here is my question, let’s suppose I have to remove a field from my content type collection/single. so for this, I do this locally, I removed that field and test at my frontend, and it is working as expected.
Git detects changes in the schema.json of that content, I add that and commit it to git, and pushed to the repo.
If I pull these changes at the staging server and that schema.json was updated with new changes, that field was removed only from the schema.json, not from the MySQL database.
If I do not pull git changes and remove that field from the admin panel then that field removes from both schema.json and the database. But in this case, git detects changes in the schema.json, and when I try to pull the changes committed locally, here I am getting a git conflict and git pull failed. Because the same file has changed at the staging server that needs to be committed before the git pull.
The same case to creating a new content type. First, I have to build it locally and integrated it with the frontend.
How do I deal with this issue?