Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add schema assert warning #1032

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pages/fundamentals/indexes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -285,6 +285,11 @@ Once all transactions have finished, the index will be deleted.

### Delete all node indexes

<Callout type="warning">
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).
</Callout>

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
Expand Down
8 changes: 7 additions & 1 deletion pages/querying/schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
<Callout type="warning">
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).
</Callout>


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:
Expand Down
Loading