bcc-code / directus-schema-sync

The better way to sync your Directus schema and data between environments
Apache License 2.0
90 stars 4 forks source link

Deleted fields or collections still exist in sync folder #43

Closed yipivan closed 3 weeks ago

yipivan commented 4 weeks ago

Describe the Bug

when I delete a field or collection from directus, the changes are not exported, that causes we cannot sync delete actions across environments.

To Reproduce

Just created a collection in directus and do an schema export then delete the collection and export again, the exported sync files still exists

Version

2.1.1

Installed Extension Via

NPM Custom

u12206050 commented 4 weeks ago

Seems to only be a problem when deleting the collection, deleting the field does seem to work. Will need to remove existing schema files before creating new ones in order to fix this issue. It seems to only be an issue when the schema is split into multiple files.

yipivan commented 3 weeks ago

Deleting a field does work on user defined collections, but if you add a field to any system collections then delete it, the sync files wont reflect the delete action.

u12206050 commented 3 weeks ago

Fixed https://github.com/bcc-code/directus-schema-sync/releases/tag/v2.1.2