# Schemas

## Adding

New schemas can be associated with a repository when they're being created (manually or via schema load).

Existing schemas may also be added in this manner when they're first touched during development (if not already associated with a repository).  However, using a [migration](https://jadelab.gitbook.io/jadegit/migration/overview) strategy for existing systems is highly recommended.

When a new schema is detected, you're prompted to select which repository you'd like to associate the schema with. You may also decide to exclude the schema, in which case any changes to the schema will be ignored by JadeGit.

![](https://content.gitbook.com/content/J7MmywDXjpFYcL5gQDv2/blobs/tXRBM9wgjMG1AOmiuqgK/image.png)

{% hint style="danger" icon="screwdriver-wrench" %}
Until support for importing schemas from other repositories can be implemented, schemas need to be added to the same repository as others they're dependent on (super schemas & package providers).  Otherwise, an error will be raised on commit indicating the prerequisite schema is unknown (because it doesn't exist in the repository changes are being extracted to). &#x20;
{% endhint %}

### Committing

When a schema is associated with a repository, a [change](https://jadelab.gitbook.io/jadegit/developers/change-tracking) is recorded against the current branch to add the schema.  On commit, a deep extract of the schema is performed to save all schema entities to the repository.
