API version: 0.3.0

---

# `schema:sync`

Creates the schema of every node label and relation type which does not have one yet, and repairs the stored schemas of
the [built-in types](/reference/schemas.md): the properties and the mode of the code always win, extensions which were
added to a built-in schema are kept. A repair is a new version with a revision of the action `sync`.

Schemas are created implicitly when a type is first used, so the command mainly matters for databases which were filled
before schemas existed, e.g. by loading an older backup. [`backup:load`](/command/backup-load.md) runs the same step after
loading.

> **ℹ Info**
>
> Every API instance runs this command every ten minutes (see
> [Background tasks](/reference/configuration.md#background-tasks)). It is skipped (successfully) while a backup is
> being loaded or the database is being reset.

## Help

```bash
php bin/console schema:sync --help
```

```text
Description:
  Creates the schemas of all built-in types and of all types without schema, and repairs the stored built-in schemas.

Usage:
  schema:sync

Options:
  -h, --help            Display help for the given command. When no command is given display help for the list command
      --silent          Do not output any message
  -q, --quiet           Only errors are displayed. All other output is suppressed
  -V, --version         Display this application version
      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -e, --env=ENV         The Environment name. [default: "prod"]
      --no-debug        Switch off debug mode.
      --profile         Enables profiling (requires debug).
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
```

## Example

```bash
php bin/console schema:sync
```

```text
    ▄
  ▄▀ ▀▄  Ember Nexus API
   ▀█▀   v0.3.0, production mode

  Schema sync

  7 schemas created, 0 built-in schemas repaired, 3 were up to date.
▶ Done.
```

---

Home: [Ember Nexus API docs](/index.md)

Full site map: [llms.txt](/llms.txt)

Previous: [migration:run](/command/migration-run.md)

Next: [healthcheck](/command/healthcheck.md)
