Skip to content

Commit 82d319a

Browse files
committed
fix: fixed regression bug in migration script
1 parent f0c39a5 commit 82d319a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/brubeck-migration-script/src/Migrator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class Migrator {
5050
if (!(await this.registryFromMigrator.exists(streamid))) {
5151
try {
5252
this.debug('creating stream ' + streamid)
53-
const transaction = await this.registryFromMigrator.populateTransaction.trustedSetStreamMetadata(streamid, 'metadata')
53+
const transaction = await this.registryFromMigrator.populateTransaction.trustedSetStreamMetadata(streamid, streams[streamid].metadata)
5454
await this.sendTransaction(transaction)
5555
} catch (e) {
5656
this.debug('ERROR creating stream: ' + e)

packages/brubeck-migration-script/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ const compareAndMigrate = async () => {
4545
const streams: any = {}
4646
results.forEach((queryResultLine: any) => {
4747
const metadata = JSON.stringify({
48-
description: queryResultLine.description,
49-
partitions: queryResultLine.partitions,
48+
description: queryResultLine.description || '',
49+
partitions: queryResultLine.partitions || 1,
5050
inactivityThresholdHours: queryResultLine.inactivity_threshold_hours
5151
})
5252
if (ethers.utils.isAddress(queryResultLine.username)) {

0 commit comments

Comments
 (0)