Skip to content

Conversation

@touhidurabir
Copy link
Member

Comment on lines +107 to +109
if ($currentVersion->major == 3 && $currentVersion->minor == 4 && $currentVersion->build >= 11) {
return;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wondering if we should make it more robust by checking if there was a 3.4.0-11 version ever installed . as we have following upgrade path one for 3.4.0

<upgrade minversion="3.4.0.0" maxversion="3.4.0.11">
		<!-- Only new 3.4 installations need this fix -->
		<migration class="PKP\migration\upgrade\v3_4_0\I12140_MissingDecisionConstantsUpdate"/>
	</upgrade>

so , this patch will be only applied for 3.4.0-11 upgrade from 3.4.0-10 or below . But if a installation upgrade from say 3.4.0-8 to 3.4.0-12, this patch will not be applied for it when upgrading from 3.4.0-12 to 3.5.0-*. so having a check like following

// If upgrading from 3.4.0-11 or above, then we have a fixed applied also for it
        // at https://github.com/pkp/pkp-lib/issues/12140
        if ($currentVersion->major == 3 && $currentVersion->minor == 4 && $currentVersion->build >= 11) {
            // return;
            $versionOf34_11 = DB::table('versions')
                ->where('product', Application::get()->getName())
                ->where('product_type', 'core')
                ->where('major', 3)
                ->where('minor', 4)
                ->where('build', 11)
                ->first();
            
            // check if the patch applied for 3.4.0-11 exists and if so, 
            // nothing to do and return
            if ($versionOf34_11) {
                return;
            }
        }

but again if installation do upgrade from say 3.4.0-5 to directly 3.4.0-12 without this patch and then manually run the 3.4.0-11 migration, then the above check will mess it again . Need a resolution on this .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant