Migrating database schema
This guide shows how to upgrade database schema when upgrading Perforator.
Warning
To minimize disruption, apply migrations before updating binaries.
Migrating PostgreSQL database
Run the following command from the source root:
./ya run perforator/cmd/migrate postgres up --hosts HOST --user USER --pass PASSWORD
Where:
HOST
is the hostname of the PostgreSQL primary server.USER
andPASSWORD
are credentials to connect to the PostgreSQL server.
Migrating ClickHouse database
Run the following command from the source root:
./ya run perforator/cmd/migrate clickhouse up --hosts HOSTS --user USER --pass PASSWORD
Where:
HOSTS
is a comma-separated list of ClickHouse hosts.USER
andPASSWORD
are credentials to connect to the ClickHouse server.