Skip to content

Releases: bcc-code/directus-schema-sync

Version 3.0.2

16 Sep 12:56
Compare
Choose a tag to compare

What's Changed

  • Automatically export schema on first install by @rvanoord in #50

Full Changelog: v3.0.1...v3.0.2

Version 3.0.1

10 Aug 14:12
Compare
Choose a tag to compare

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

10 Aug 09:55
Compare
Choose a tag to compare

Updated for the Directus 11.

Migration guide:

  1. First update to Directus 11, including running npx directus database migrate:latest
  2. Then install schema-sync npm install directus-extension-schema-sync@latest -S
  3. 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
  4. Paste the updated configuration into your ./schema-sync/directus_config.js file
  5. 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

07 Jun 12:22
Compare
Choose a tag to compare
  • Remove old schema files when generating new schema files.
    • This is to remove files of deleted collections.

Version 2.1.1

30 May 15:02
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.1.0...v2.1.1

Version 2.1.0

29 May 18:42
Compare
Choose a tag to compare

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

16 May 07:35
Compare
Choose a tag to compare

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 in schema-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

27 Feb 07:51
Compare
Choose a tag to compare

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

05 Feb 12:52
Compare
Choose a tag to compare

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' } },
          },
        },
      },
    }
  • 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