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:
HOSTis the hostname of the PostgreSQL primary server.USERandPASSWORDare 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:
HOSTSis a comma-separated list of ClickHouse hosts.USERandPASSWORDare credentials to connect to the ClickHouse server.