Skip to content

Commit 85cd52d

Browse files
authored
fix(zero-cache): setup the CVR schema in single-thread mode (rocicorp#2263)
1 parent 80f659e commit 85cd52d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/zero-cache/src/server/single-thread.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
} from '../services/replicator/replicator.js';
1313
import {DatabaseStorage} from '../services/view-syncer/database-storage.js';
1414
import {PipelineDriver} from '../services/view-syncer/pipeline-driver.js';
15+
import {initViewSyncerSchema} from '../services/view-syncer/schema/pg-migrations.js';
1516
import {Snapshotter} from '../services/view-syncer/snapshotter.js';
1617
import {ViewSyncerService} from '../services/view-syncer/view-syncer.js';
1718
import {postgresTypeConfig} from '../types/pg.js';
@@ -51,6 +52,8 @@ const upstreamDB = postgres(config.UPSTREAM_URI, {
5152
max: 5,
5253
});
5354

55+
await initViewSyncerSchema(lc, 'view-syncer', 'cvr', cvrDB);
56+
5457
const tmpDir = config.STORAGE_DB_TMP_DIR ?? tmpdir();
5558
const operatorStorage = DatabaseStorage.create(
5659
lc.withContext('component', 'syncer'),

0 commit comments

Comments
 (0)