Releases: bcc-code/directus-schema-sync
Version 3.0.2
What's Changed
Full Changelog: v3.0.1...v3.0.2
Version 3.0.1
Just fixed directus_config.js
duplicate permissions configuration.
For migration guide please refer to Version 3
Full Changelog: 3.0.0...v3.0.1
Version 3.0.0
Updated for the Directus 11.
Migration guide:
- First update to Directus 11, including running
npx directus database migrate:latest
- Then install schema-sync
npm install directus-extension-schema-sync@latest -S
- Then copy the new configuration for policies and access, as well as the updated config for permissions and roles from
node_modules/directus-extension-schema-sync/install/schema-sync/directus_config.js
- Paste the updated configuration into your
./schema-sync/directus_config.js
file - Finally run
npx directus schema-sync export
to generate a new snapshot with the latest schema 🎉
Full Changelog: v2.1.2...3.0.0
Version 2.1.2
- Remove old schema files when generating new schema files.
- This is to remove files of deleted collections.
Version 2.1.1
What's Changed
- Collection exporter issue - throw clearer error by @StevenMalaihollo in #41
New Contributors
- @StevenMalaihollo made their first contribution in #41
Full Changelog: v2.1.0...v2.1.1
Version 2.1.0
Added groupBy parameter to collection options
(optional) array of fields to group the exported data into multiple files, eg. ['collection'] (per collection)
This is useful when you have a large amount of data in a collection (such as directus_permissions) and want to split it up into multiple files.
{
directus_permissions: {
watch: ['permissions'],
groupBy: ['collection', 'role'],
…
},
}
Full Changelog: v2.0.0...v2.1.0
v2.0.0
Version 2.0.0 ⚠️ Breaking change, due to new feature
By default will split schema file up into multiple files per collection
-
Why? This is to make it easier to manage the schema files in git, as well as to make it easier to work with the schema files in general.
-
How? The schema files will be split up into multiple files per collection. The main file will be named
schema.json
and will contain a flag stating if it is partial (split). The collection files will be named after the collection name, and will contain the schema for that collection. All collection files will be placed inschema-sync/data/schema
. -
What do I need to do?
- If you have any custom scripts that rely on the schema file, you will need to update them to work with the new structure.
- You will also need to export the schema again to get the new structure.
- Add the new schema files to git.
-
What if I don't want this? You can set
SCHEMA_SYNC_SPLIT=false
in your environment file to disable this feature.
v1.6.4
Version 1.6.4
- Update hash and timestamp after manually triggering import via cli.
- This will also force reset the lock if any errors occurred during an earlier import.
Full Code Diff: 1.6.3...v1.6.4
v1.6.3
Version 1.6.3
- Add
linkedFields
to fix inserting ordered items that might depend on each other.- Specifically fixes importing of flow operations, update the directus_config and add
linkedFields
.
{ directus_operations: { watch: ['operations'], excludeFields: ['user_created'], linkedFields: ['resolve', 'reject'], query: { filter: { flow: { trigger: { _neq: 'webhook' } }, }, }, }, }
- Specifically fixes importing of flow operations, update the directus_config and add
- Also fix auto IMPORT issue when mv_ts is null.
Other changes
- add functions for forcing auto increment (serial data type) on postgres by @adelinn in #17
- chore: add publish pipeline by @adelinn in #21
Changelog: https://github.com/bcc-code/directus-schema-sync/blob/main/CHANGELOG.md
Full Code Diff: 1.6.2...v1.6.3