Skip to content

Commit 1afcc85

Browse files
committed
docs: document removing an identity schema from a project
The GitOps identity-schema section now covers removal: delete the schema from the config's schemas list to remove it, subject to a 409 in_use_by_identity guard, and you can't remove the last or default schema.
1 parent 9fada1e commit 1afcc85

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

docs/guides/gitops.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,9 @@ For example:
176176
```
177177

178178
You can now save the default Identity Schema and custom Identity Schemas in git. When you make changes, convert the new Identity
179-
Schema to base64 and update it in the config file. You can only update existing identity schemas, to create a new one use the Ory
180-
Console. Use the following command to convert a file to base64 and copy it to the clipboard:
179+
Schema to base64 and update it in the config file. You can update existing identity schemas here, and remove one by leaving it out
180+
of the `schemas` list (see below); to create a new one, use the Ory Console. Use the following command to convert a file to base64
181+
and copy it to the clipboard:
181182

182183
```bash
183184
base64 < identity-schema.json | pbcopy
@@ -199,6 +200,11 @@ Now add the base64 encoded string to your configuration:
199200
When you update the configuration, Ory Network will automatically decode the base64 string and save the updated Identity Schema in
200201
the Ory Network backend.
201202

203+
To remove a custom identity schema, delete its entry from the `schemas` list and update the configuration. Ory Network removes it
204+
from the project, as long as no existing identity still uses it. If an identity does, the update is rejected with a `409 Conflict`
205+
(`reason: in_use_by_identity`) that lists the affected schemas — remove or migrate those identities first, then apply the change
206+
again. You can't remove the last remaining schema or the one referenced by `default_schema_id`.
207+
202208
## Email Templates
203209

204210
You can also version and track email templates in the same way. One option is to create a folder in your repository for email

0 commit comments

Comments
 (0)