﻿# Updating & Applying database migrations

## Description

Atlas Server comes with a ready\-to\-use migrator service for Docker Compose\.

The [docker\-compose\.yml](https://pvs-studio.com/en/docs/manual/7196/) configuration file includes a **migrator** service designed to update the database\.

The service has two commands: `check` and `migrate`\. Apply them according to the update procedure\.

## Update procedure

1. Specify the PVS\-Studio Atlas Server version as a tag for the Docker images\.
1. Download the update using the `docker compose --profile manual pull` command\.
1. Check for new database migrations using the `docker compose run --rm migrator check` command\.  This is important for choosing the next step\.
1. **If there are no migrations**, start the updated services using the `docker compose up -d` command\.
1. **If there are migrations**, stop the services connected to the database using the `docker compose stop dashboard` command\.
1. Run the migration using the `docker compose run --rm migrator migrate` command\.  Confirm all migration steps\.
1. Start the updated services using the `docker compose up -d` command\.