role.delete()
Learn: Roles |
---|
We recommend you use FSL to create and update user-defined roles. See FSL role schema. |
Delete a user-defined role.
Description
Deletes a user-defined role, represented as a
Role
document.
Role
documents are FQL versions of a database’s FSL
role schema. See Roles.
Staged schema
You can’t delete a role while a database has staged schema.
If the database has no staged schema, using this method is equivalent to making an unstaged schema change. Changes are applied immediately to the database’s active schema.
Avoid concurrent schema changes
Concurrent unstaged schema changes can cause contended transactions, even if the changes affect different resources. This includes unstaged changes made using:
-
The Fauna CLI
-
The Fauna Dashboard
-
The Fauna Core HTTP API’s Schema endpoints
A schema change triggers a transaction that validates the entire database schema. To avoid errors, do one of the following instead:
-
Perform unstaged schema changes sequentially