appwrite-utils-cli 0.0.265 → 0.0.266

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.
@@ -8,12 +8,6 @@ export const createOrUpdateIndex = async (dbId, db, collectionId, index) => {
8
8
  if (existingIndex.total > 0) {
9
9
  await db.deleteIndex(dbId, collectionId, existingIndex.indexes[0].key);
10
10
  }
11
- if (index.type === "fulltext" && index.attributes.length > 1) {
12
- throw new Error(`Fulltext index can only be created on a single attribute. Index: ${index.key}`);
13
- }
14
- else if (index.type === "fulltext") {
15
- index.attributes = [index.attributes[0]];
16
- }
17
11
  const newIndex = await db.createIndex(dbId, collectionId, index.key, index.type, index.attributes, index.orders);
18
12
  return newIndex;
19
13
  };
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.265",
4
+ "version": "0.0.266",
5
5
  "main": "src/main.ts",
6
6
  "type": "module",
7
7
  "repository": {
@@ -14,13 +14,6 @@ export const createOrUpdateIndex = async (
14
14
  if (existingIndex.total > 0) {
15
15
  await db.deleteIndex(dbId, collectionId, existingIndex.indexes[0].key);
16
16
  }
17
- if (index.type === "fulltext" && index.attributes.length > 1) {
18
- throw new Error(
19
- `Fulltext index can only be created on a single attribute. Index: ${index.key}`
20
- );
21
- } else if (index.type === "fulltext") {
22
- index.attributes = [index.attributes[0]];
23
- }
24
17
  const newIndex = await db.createIndex(
25
18
  dbId,
26
19
  collectionId,