Syncing Low Variables and Version Control question
I've inherited a site that's using Low Variables and I have a question concerning syncing and saving as files.
We're using a git repo to store all site files and have a script that allows us to sync the production database to our local environment. The client primarily makes edits to the production database via the site's control panel.
We're encountering an issue where if the client changes a Low Variable in production and we edit something in templates and deploy, their edits are being replaced with the content of the files saved in the templates. I can see that there's an accommodation for syncing the database to the files, but we need a way to sync our local files to the database content.
Is there a way to do this?
Replies
Low 7 Oct 2017 09:26
The one-way-sync is meant for cases like this, where files are leading. You can try and use the regular sync, which will look at timestamps in the DB and files; the youngest version will then be leading.
ImpDesigns 11 Oct 2017 15:24
Forgive me for being slow, but I need the database to be 'leading.' What settings would I need to make that happen?
I've got this:
Clear Cache: Yes
Enable Early Parsing: Yes, before snippets
Save as Files: No
One way sync: No
Low 11 Oct 2017 17:05
There's currently no way to have the DB leading.
If you set Save as Files to Yes and One way sync to No, then vars will be synced based on edit date (both ways). So if the edit date in the DB is newer than the last modified date on the server, the DB will sync to the server. And vice versa.