# Deleting Schema

## 1. Overview

When a user attempts to delete a schema from the grid page, a modal window appears to confirm the action and display relevant dependency information.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FmTP4g6DMQALJZ4ThmYxe%2Fimage.png?alt=media&#x26;token=d32385ec-7c83-4905-85f7-0a942daba914" alt=""><figcaption></figcaption></figure>

## 2. Functional Details

### 2.1 Deleting Schemas with Child Schemas

When deleting a schema that has child schemas:

* The modal displays a list of all child schemas that can be deleted along with it.
* It also shows which child schemas cannot be deleted due to dependencies on other schemas.
* A checkbox allows the user to choose whether to:
* Delete only the selected schema, or
* Delete the selected scheme and all its child schemas.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FjS6wSfcE1QNID8GJqry7%2Fimage.png?alt=media&#x26;token=3ff02f36-8af4-42a0-a6c6-ebd1820ced48" alt=""><figcaption></figcaption></figure>

### 2.2 Deleting Schemas with Parent Dependencies

If the selected schema depends on one or more parent schemas, deletion is not allowed.\
&#x20;In this case:

* The modal displays a warning message explaining that the scheme cannot be deleted due to existing dependencies.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FPzYyMgbaRFesFzFvXFHR%2Fimage.png?alt=media&#x26;token=f5b9af1e-b661-49f2-819b-f07cbe5843fa" alt=""><figcaption></figcaption></figure>

### 2.3 Deleting all Schemas

User will now be able to delete all schemas for a particular policy by using "Delete All Schemas" button:

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2F1L266MekMISoC81w52bp%2Fimage.png?alt=media&#x26;token=eb9fd8b5-e4f9-4c36-afe0-5d3afe9c50e0" alt=""><figcaption></figcaption></figure>
