Fix limit issue

This commit is contained in:
Gerard
2023-10-23 20:52:45 +02:00
parent 4639bba5c6
commit 542ef1dae5
4 changed files with 9 additions and 4 deletions

View File

@@ -1,3 +1,7 @@
## Version 1.1.5
Set query limit to -1, unless manually set in config.js inside the query option. This fixes an issue with not all permissions being fetched.
## Version 1.1.4
Add optional prefix option to differentiate between different sets of data. Prefix can be set on the collection configuration in config.js eg. `test` or `prod`.

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "directus-extension-schema-sync",
"version": "1.1.4",
"version": "1.1.5",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "directus-extension-schema-sync",
"version": "1.1.4",
"version": "1.1.5",
"bin": {
"schema-sync": "cli.js"
},

View File

@@ -2,7 +2,7 @@
"name": "directus-extension-schema-sync",
"description": "Sync schema and data betwreen Directus instances",
"icon": "sync_alt",
"version": "1.1.4",
"version": "1.1.5",
"keywords": [
"directus",
"directus-extension",

View File

@@ -77,7 +77,8 @@ class CollectionExporter implements IExporter {
const getPrimary = (o: Item) => o[schema.primary];
const getKey = this.options.getKey || getPrimary;
const query: Query = this.options.query || { limit: -1 };
const query: Query = this.options.query || {};
query.limit = query.limit || -1;
query.fields = inclFields;
query.sort = query.sort || [schema.primary];