Skip to content

Commit

Permalink
Merge pull request #4175 from alkem-io/develop
Browse files Browse the repository at this point in the history
Migration fix
  • Loading branch information
valentinyanakiev authored Jun 28, 2024
2 parents f5f84bb + 2e65e6e commit 2dd9774
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "alkemio-server",
"version": "0.82.3",
"version": "0.82.4",
"description": "Alkemio server, responsible for managing the shared Alkemio platform",
"author": "Alkemio Foundation",
"private": false,
Expand Down
10 changes: 7 additions & 3 deletions src/migrations/1719550326418-accountStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ export class accountStorage1719550326418 implements MigrationInterface {
}[] = await queryRunner.query(
`SELECT id, storageAggregatorId FROM space WHERE id = '${account.spaceId}'`
);
await queryRunner.query(
`UPDATE storage_aggregator SET parentStorageAggregatorId = '${accountStorageAggregatorID}' WHERE id = '${rootSpace.storageAggregatorId}'`
);
if (rootSpace) {
await queryRunner.query(
`UPDATE storage_aggregator SET parentStorageAggregatorId = '${accountStorageAggregatorID}' WHERE id = '${rootSpace.storageAggregatorId}'`
);
} else {
console.log(`No root space found for account ${account.id}`);
}
}

await queryRunner.query(
Expand Down

0 comments on commit 2dd9774

Please sign in to comment.