Open boring-joey opened 5 months ago
Hmm very interesting... is this on a new db or an existing one?
It’s on a existing database and the collection ‘ dbl_section_newsletter’ already exists on both databases
Hmm, so it is trying to recreate a collection even though it already exists. This library just uses the default schema apply functionality of Directus, and by the looks of the log that does seem to be where it is failing, so not much I am able to do yet.
Could you test if it works if you disable the schema split option. If it then still fails we know 100% the issue is within Directus schema diff apply, otherwise if it works, then it might be in the way the split schema files are joined together again, it may be possible the ordering of it could affect the import.
I will check that and update the status here. Another strange part is that when i remove the failing table 'dbl_section_newsletter' in the target database it will create the table but won't add any fields in it.
Describe the Bug
When running the migrations in our acceptance environment, we encounter an error indicating that one of the JSON collections is missing a 'collection' field. This is our interpretation of the error message. We have reviewed the JSON files, and all of them include a 'collection' field.
Do you have any insights into what might be causing this issue or suggestions on how we can better debug it?
Error log:
Our JSON file:
To Reproduce
We use the command:
npx directus schema-sync import
on our docker container.Version
2.1.2
Installed Extension Via
Docker file