Skip to content

Commit

Permalink
Revert "#110 | Optimize schemaMigration to be updated only if there a…
Browse files Browse the repository at this point in the history
…re changes"

This reverts commit 0fbc2cd.
  • Loading branch information
himeshr committed Jan 8, 2025
1 parent 0fbc2cd commit d233d7e
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ public Organisation migrate(Organisation organisation) {
SchemaMetadata newSchemaMetadata = schemaMetadataRepository.getNewSchemaMetadata();

List<Diff> changes = newSchemaMetadata.findChanges(organisation.getSchemaMetadata());
if(!changes.isEmpty()) {
schemaMetadataRepository.applyChanges(changes);
organisation.applyNewSchema(newSchemaMetadata);
schemaMetadataRepository.save(organisation.getSchemaMetadata());
}
schemaMetadataRepository.applyChanges(changes);

organisation.applyNewSchema(newSchemaMetadata);

schemaMetadataRepository.save(organisation.getSchemaMetadata());

return organisation;
}

Expand Down

0 comments on commit d233d7e

Please sign in to comment.