Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2.1
orbs:
common: dailydotdev/common@0.0.19
common: dailydotdev/common@0.0.20

jobs:
build-app:
Expand Down
2 changes: 2 additions & 0 deletions .infra/clickhouse-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ database.allowPublicKeyRetrieval: "true"
snapshot.mode: "no_data"

slot.name: "clickhouse_sync"
publication.name: "clickhouse_sync"
publication.autocreate.mode: "disabled"

# offset.flush.interval.ms: The number of milliseconds to wait before flushing recent offsets to Kafka. This ensures that offsets are committed within the specified time interval.
offset.flush.timeout.ms: 10000
Expand Down
23 changes: 23 additions & 0 deletions src/migration/1784621038147-CreateClickHousePublication.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import type { MigrationInterface, QueryRunner } from 'typeorm';

export class CreateClickHousePublication1784621038147 implements MigrationInterface {
name = 'CreateClickHousePublication1784621038147';

public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(/* sql */ `
DROP PUBLICATION IF EXISTS "clickhouse_sync"
`);

await queryRunner.query(/* sql */ `
CREATE PUBLICATION "clickhouse_sync"
FOR ALL TABLES
WITH (publish_generated_columns = stored)
`);
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(/* sql */ `
DROP PUBLICATION IF EXISTS "clickhouse_sync"
`);
}
}
Loading