Skip to content

Clickhouse - basic migrations support

Currently, we manage the Clickhouse database schema entirely by hand.

This has a few disadvantages:

  1. only a few people have access to do that
  2. it's error-prone
  3. it requires a lot of internal knowledge, so it will be very hard for self-managed users to adopt Clickhouse

We want to introduce a special rake task, that will run the migrations.

For the inspiration we can use:

  1. https://github.com/PNixx/clickhouse-activerecord/tree/master
  2. https://github.com/PNixx/clickhouse-activerecord/blob/master/lib/clickhouse-activerecord/migration.rb

This will not address:

  1. Rollbacks
  2. Automatically running the migrations during GitLab upgrades

Those things will be be addressed on the next stage: ClickHouse adoption - Stage 3 - self-managed op... (&11721)

Edited by Vladimir Shushlin