appwrite-utils-cli 0.0.267 → 0.0.268
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -154,12 +154,12 @@ export const createOrUpdateCollections = async (database, databaseId, config, de
|
|
154
154
|
nameToIdMapping.set(collection.name, collectionToUse.$id);
|
155
155
|
}
|
156
156
|
else {
|
157
|
-
collectionToUse = await database.createCollection(databaseId, ID.unique(), collection.name, permissions, collection.documentSecurity, collection.enabled);
|
157
|
+
collectionToUse = await database.createCollection(databaseId, collection.$id || ID.unique(), collection.name, permissions, collection.documentSecurity, collection.enabled);
|
158
158
|
nameToIdMapping.set(collection.name, collectionToUse.$id);
|
159
159
|
}
|
160
160
|
}
|
161
161
|
else {
|
162
|
-
collectionToUse = await database.createCollection(databaseId, ID.unique(), collection.name, permissions, collection.documentSecurity, collection.enabled);
|
162
|
+
collectionToUse = await database.createCollection(databaseId, collection.$id || ID.unique(), collection.name, permissions, collection.documentSecurity, collection.enabled);
|
163
163
|
nameToIdMapping.set(collection.name, collectionToUse.$id);
|
164
164
|
}
|
165
165
|
}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "appwrite-utils-cli",
|
3
3
|
"description": "Appwrite Utility Functions to help with database management, data conversion, data import, migrations, and much more. Meant to be used as a CLI tool, I do not recommend installing this in frontend environments.",
|
4
|
-
"version": "0.0.
|
4
|
+
"version": "0.0.268",
|
5
5
|
"main": "src/main.ts",
|
6
6
|
"type": "module",
|
7
7
|
"repository": {
|
@@ -215,7 +215,7 @@ export const createOrUpdateCollections = async (
|
|
215
215
|
} else {
|
216
216
|
collectionToUse = await database.createCollection(
|
217
217
|
databaseId,
|
218
|
-
ID.unique(),
|
218
|
+
collection.$id || ID.unique(),
|
219
219
|
collection.name,
|
220
220
|
permissions,
|
221
221
|
collection.documentSecurity,
|
@@ -226,7 +226,7 @@ export const createOrUpdateCollections = async (
|
|
226
226
|
} else {
|
227
227
|
collectionToUse = await database.createCollection(
|
228
228
|
databaseId,
|
229
|
-
ID.unique(),
|
229
|
+
collection.$id || ID.unique(),
|
230
230
|
collection.name,
|
231
231
|
permissions,
|
232
232
|
collection.documentSecurity,
|