Skip to content

Commit 717be79

Browse files
committed
fix: create migration for fixing sql update replication issue
1 parent 6fe8aeb commit 717be79

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { MigrationInterface, QueryRunner } from "typeorm";
2+
3+
export class DebeziumReplicationAdhoc1768995735317 implements MigrationInterface {
4+
public async up(queryRunner: QueryRunner): Promise<void> {
5+
await queryRunner.query(/* sql */`
6+
DROP PUBLICATION dbz_publication;
7+
`);
8+
await queryRunner.query(/* sql */`
9+
CREATE PUBLICATION dbz_publication
10+
FOR ALL TABLES
11+
WITH (publish_generated_columns = stored);
12+
`);
13+
}
14+
15+
public async down(queryRunner: QueryRunner): Promise<void> {
16+
await queryRunner.query(/* sql */`
17+
DROP PUBLICATION dbz_publication;
18+
`);
19+
await queryRunner.query(/* sql */`
20+
CREATE PUBLICATION dbz_publication
21+
FOR ALL TABLES;
22+
`);
23+
}
24+
}

0 commit comments

Comments
 (0)