Skip to content
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

Fix upgrading from concrete5 5.7 - v2 #8433

Merged
merged 3 commits into from Mar 11, 2020

Conversation

mlocati
Copy link
Contributor

@mlocati mlocati commented Feb 21, 2020

This is an alternative approach to #8428

Here we basically delay the creation of foreign keys until the migration is completed, so that we can skip setting foreign_key_checks to 0 (which seems to somehow break the database in selected MySQL/MariaDB versions).

@aembler
Copy link
Member

aembler commented Mar 11, 2020

👏 👏 👏

@mlocati mlocati deleted the fix-migrations-v2 branch March 11, 2020 13:29
@hissy
Copy link
Contributor

hissy commented Jun 15, 2020

A user from Japan reported failing upgrade from 8.5.2 to 8.5.3.
In his environment, table TreeFileFolderNodes didn't exist.
I told him to run migration 20190309000000, then his concrete5 worked.
Is it relate to this change?

Original report (Japanese): https://concrete5-japan.org/community/forums/install/post-19107/

@mlocati
Copy link
Contributor Author

mlocati commented Jun 15, 2020

I just noticed the same problem when upgrading our websites from 8.5.2 to 8.5.4.
See #8771 for a more detailed analysis.

@hostco
Copy link

hostco commented Jun 15, 2020

Seeing this same issue with 8.5.2 to 8.5.3 randomly on some sites

TreeFileFolderNodes doesn't exist

Other sites 8.5.2 > 8.5.3 > 8.5.4 works without any issues.

I just had a situation where I copied a production site to a dev account with the exact same php config upgraded from 8.5.1 > 8.5.2 > 8.5.3 > 8.5.4 and had no issues.

When I tried to upgrade the production area directly the same way, I could not get past 8.5.2

Migration 20190309000000 did resolve the issue

@biplobice
Copy link
Contributor

Seeing this same issue with 8.5.2 to 8.5.3 randomly on some sites

It's not like that. Seems the sites who use folders in the file manager would be affected.

Another thing, I would like to share-
The CLI was broken with the same error on a site we maintain because of the following code on app.php

        $editor = $this->app->make('editor');
         ..........
         ..........

We could rerun the migration after adding the following check-

    if (!\Concrete\Core\Application\Application::isRunThroughCommandLineInterface()) {
         $editor = $this->app->make('editor');
          ......
    }

@mlocati
Copy link
Contributor Author

mlocati commented Jun 16, 2020

Migration 20190309000000 did resolve the issue

So, I guess that #8771 is the actual cause of this issue (and we should stop commenting on this #8443 since it's unrelated)

@hissy
Copy link
Contributor

hissy commented Jun 16, 2020

Alright, let's go to #8771

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.

None yet

5 participants