Hello. I want to ask a question.
I will tell you about my situation.
I have 2 Squidex apps.
Development and Staging.
In development, I add every day new content and schemas.
In Staging Content managers adjust my content, change my texts and translate them.
Every month I need to migration.
What I need.
I need to move new schema element to staging with it content, but save all changes makes in Staging.
How can I do that ?
This is my sq cli script.
./sq config add dev dev:default secret -u https://dev-squidex.com/
./sq config use dev
./sq sync out DevToProd1
./sq config add stg stg:default secret -u https://stg-squidex.com/
./sq config use stg
./sq sync in --content-action=UpsertPatch --skip-assets DevToProd1
The problem is - When I run it all changes makes in staging I lost, but I want to keep staging content changes, and add new items from dev
There is no way to know what content is newer. Perhaps it can be integrated in the CLI, but this is basically primary to primary sync and there are always conflicts.
No need to know which one is newest, only need to keep content, and add new ones.
So you do not want to make updates? Only additions?
Yes I want to only add new elements, and let old changes
have you tried --content-action=Create
Yes I tried, and in that way, In Staging I can see that my changes don’t lose and the new schema element is visible, but the content of that schema doesn’t comes with them.
Example.
Dev environment.
{
key1: ‘Key1 Text’,
key2: ‘Key2 Text’,
}
Stage environment.
{
key1: ‘Different Text’,
}
After Migration with --content-action=Create I get this State
Dev environment.
{
key1: ‘Key1 Text’,
key2: ‘Key2 Text’,
}
Stage environment.
{
key1: ‘Different Text’, – Is okay
key2: “”, Not okay, text doesn’t come
}
I need to be this state.
Stage environment.
{
key1: ‘Different Text’,
key2: ''Key2 text",
}
Oh, sorry for the misunderstanding. This is not possible because we don’t track what is new and what is not new. If you want to do that you have to implement it yourself. Because an undefined field could also be by purpose.