Fix logic behind SchemaVersion.isFirstComposableVersion (#5402)

This commit is contained in:
Kamil Kisiela 2025-01-02 16:04:35 +01:00 committed by GitHub
parent 32f9862dc5
commit 8483bd506f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -280,11 +280,15 @@ export class SchemaVersionHelper {
}
async getIsFirstComposableVersion(schemaVersion: SchemaVersion) {
if (!schemaVersion.isComposable) {
return false;
}
if (schemaVersion.recordVersion === '2024-01-10') {
return schemaVersion.diffSchemaVersionId === null;
}
if (schemaVersion.hasPersistedSchemaChanges && schemaVersion.isComposable) {
if (schemaVersion.hasPersistedSchemaChanges) {
const previousVersion = await this.getPreviousDiffableSchemaVersion(schemaVersion);
if (previousVersion === null) {
return true;