> For the complete documentation index, see [llms.txt](https://docs.aamsystems.ru/passoffice/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aamsystems.ru/passoffice/passoffice-guide/admin-guide-doc/ustanovka-passoffice/obnovlenie-passoffice/obnovlenie-struktury-bazy-dannykh.md).

# Обновление структуры базы данных

От версии к версии структура базы данных PassOffice может меняться в зависимости от добавления новых объектов и таблиц, а так же изменения и удаления старых.

Для того, чтобы подготовить базу данных для работы с новой версией PassOffice, используются специальные миграции, которые изменяют ее структуру.

При первом запуске после [обновления](/passoffice/passoffice-guide/admin-guide-doc/ustanovka-passoffice/obnovlenie-passoffice.md) PassOffice в консоли появится сообщение:

```bash
Database migration is needed. 
Make sure that you have done database backup. 
Do you want to proceed? (Yes/No)
```

{% hint style="danger" %}
Перед запуском обновления базы данных всегда выполняйте [резервное копирование](/passoffice/passoffice-guide/admin-guide-doc/ustanovka-passoffice/obsluzhivanie-passoffice/rezervnoe-kopirovanie-i-vosstanovlenie-bazy-dannykh-postgresql.md).
{% endhint %}

Введите **Yes** и нажмите Enter. После обновления структуры базы данных сервер PassOffice будет запущен.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.aamsystems.ru/passoffice/passoffice-guide/admin-guide-doc/ustanovka-passoffice/obnovlenie-passoffice/obnovlenie-struktury-bazy-dannykh.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
