type_bridge.migration.exceptions¶
exceptions
¶
Schema-related exceptions for TypeDB schema management.
SchemaValidationError
¶
Bases: Exception
Raised when schema validation fails during schema generation.
This exception is raised when the Python model definitions violate TypeDB constraints or best practices.
SchemaConflictError
¶
Bases: Exception
Raised when there are conflicting schema changes during sync.
This exception is raised when attempting to sync a schema that has breaking changes (removed or modified types/attributes) compared to the existing database schema.
Initialize SchemaConflictError.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
diff
|
SchemaDiff
|
SchemaDiff containing the conflicting changes |
required |
message
|
str | None
|
Optional custom error message |
None
|
Source code in type_bridge/migration/exceptions.py
has_breaking_changes
¶
Check if the diff contains breaking changes.
Breaking changes include removed or modified types/attributes.
Returns:
| Type | Description |
|---|---|
bool
|
True if there are breaking changes |