From 5bad0afc2f9fc263036d8ba6f3cf259657a1919e Mon Sep 17 00:00:00 2001 From: katarinasupe Date: Tue, 5 Nov 2024 14:10:56 +0100 Subject: [PATCH] Add schema assert warning --- pages/fundamentals/indexes.mdx | 7 ++++++- pages/querying/schema.mdx | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/pages/fundamentals/indexes.mdx b/pages/fundamentals/indexes.mdx index 56b0fb631..c96511e58 100644 --- a/pages/fundamentals/indexes.mdx +++ b/pages/fundamentals/indexes.mdx @@ -214,7 +214,7 @@ choice may cause queries to perform poorly. ### Schema-related procedures -You can [delete all node indexes](#delete-all-node-indexes) or modify them using the [`schema.assert()` procedure](/querying/schema#assert). +You can modify indexes using the [`schema.assert()` procedure](/querying/schema#assert). ### Speed comparison @@ -285,6 +285,11 @@ Once all transactions have finished, the index will be deleted. ### Delete all node indexes + +The `schema.assert()` procedure will not drop edge-type and point indexes. +Our plan is to update it, and you can track the progress on our [GitHub](https://github.com/memgraph/memgraph/issues/2462). + + To delete all indexes, use the [`schema.assert()`](/querying/schema#assert) procedure with the following parameters: - `indices_map` = `{}` - `unique_constraints` = map of key-value pairs of all uniqueness constraints in the database diff --git a/pages/querying/schema.mdx b/pages/querying/schema.mdx index 0f73438b6..d3b07f15f 100644 --- a/pages/querying/schema.mdx +++ b/pages/querying/schema.mdx @@ -434,7 +434,13 @@ Results: #### Delete all node indexes -The `assert()` procedure can be used to delete all indexes and constraints, **except for edge-type indices**. By + +The `schema.assert()` procedure will not drop edge-type and point indexes. +Our plan is to update it, and you can track the progress on our [GitHub](https://github.com/memgraph/memgraph/issues/2462). + + + +The `assert()` procedure can be used to delete all indexes and constraints. By providing empty `indices_map`, `unique_constraints` and `existence_constraints` as well as `drop_existing` set to `true`, ensure that there are no indexes or constraints in the database. Here is the query for deleting all indexes and constraints: