You can create a migration by creating a Ruby migration file in `db/click_house/migrate` folder. It should be prefixed with a timestamp in the format `YYYYMMDDHHMMSS_description_of_migration.rb`
...
...
@@ -75,17 +90,6 @@ class CreateIssues < ClickHouse::Migration
end
```
When you're working locally in your development environment, you can create or re-create your table schema by
executing `rake gitlab:clickhouse:rollback` and `rake gitlab:clickhouse:migrate`.
Alternatively, you can use the following snippet in the Rails console:
For the ClickHouse database we don't use ORM (Object Relational Mapping). The main reason is that the GitLab application has many customizations for the `ActiveRecord` PostgresSQL adapter and the application generally assumes that all databases are using `PostgreSQL`. Since ClickHouse-related features are still in a very early stage of development, we decided to implement a simple HTTP client to avoid hard to discover bugs and long debugging time when dealing with multiple `ActiveRecord` adapters.