New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade from 5.7.2 -> 5.7.4.1 is broken #2455
Comments
Yes, this is a known issue that needs to be documented. You should update from 5.7.2 to 5.7.3 first, then up to 5.7.4.1. |
@aembler I always found it quite a hassle to do upgrades like that. I never looked into it, but since every version contains the upgrade scripts for all older versions: Shouldn't it be possible to skip those versions in between? Is it worth looking into this? |
I think the issue is that when we attempt to do multiple migrations, we're
currently using the most recent code base to do each migration. Going from
5.7.2 to 5.7.4 loads the 5.7.4 code base and runs through 5.7.3 and 5.7.4
migrations. So Version 5.7.3's migration script uses the PagePath's table
(likely because it's adding a single page.) Unfortunately, it uses versions
5.7.4's script to do this, and version 5.7.4's single page class references
a column that doesn't exist in the Version 5.7.3 migration – but Version
5.7.4 hasn't been migrated yet.
I'm not sure if there's an easy way to solve this – thoughts?
|
Okay I see what you mean. I guess the only approach that would work is if we'd avoid the framework as much as possible or write code that works with two different database structures. The latter would lead to ugly code we could hardly ever remove and avoiding the framework won't always work and isn't nice either but it's what most systems do as far as I've seen. |
What's the recommended approach after upgrading from 5.7.2 to 5.7.4.1 and then running into this issue, other than truncating the database and starting anew? |
I would recommend replacing the core with 5.7.3 - upgrading to that - and then going to 5.7.4.2. That should be fine. Sent from my iPhone
|
Pretty much how I've handled this in other projects is to be strict in what This does introduce some complexity because you can't reuse functionality On 14 June 2015 at 08:11, Andrew Embler notifications@github.com wrote:
|
I've actually wondered if we shouldn't have a property on the migration classes that indicate a minimum core version needed to run the migration. This way, if someone tried to run an update and they were trying to make to big of a jump we could indicate to them which version they needed to use instead of just erroring out. |
In the future if you use the Dashboard to update, we inspect every update through concrete5.org, and will tell you if you can go from update A to update B, and even can check out potentially overrides problems |
Nice! Sounds very promising! |
Hi,
I'm currently in the process of upgrading from concrete 5.7.2 to 5.7.4.1 and having some issues with the migrations running. ( I'm using the upgrade script
/index.php/ccm/system/upgrade
)concrete/src/Updater/Migrations/Migrations/Version20141219000000.php
-> calls Page::getByPath which generates the following exceptionconcrete/src/Updater/Migrations/Migrations/Version20150504000000.php
-> defines the column ppGeneratedFromURLSlugs but this migration is never ran as the previous migration throws that exception.I've solved this locally by adding the following code to the first migration ``concrete/src/Updater/Migrations/Migrations/Version20141219000000.php` but that seems a bit hacky.
The text was updated successfully, but these errors were encountered: