-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Issue while upgrading to 18 Beta1 (SQL, related to Flow) #18265
Comments
So my upgrade exploded completely in what looks like the same way...
💣
💥
Now I'm stuck on a broken instance... Tips would be helpful ;-) |
@blizzz as I see workflow here, I'm going to put the blame on you for now. Feel free to distribute or just blame it on the user 😬 This doesn't always go wrong, clearly, as my desktop at home updated properly, the laptop test instance did not howevah. |
I had the same issue. In order to keep using nextcloud, I moved the nextcloud installation to another folder, installed version 17.0.1, and then copied my config from my old nextcloud installation. I then had to reinstall a few apps that weren't included with the basic 17.0.1 installation. Edit: Having looked at my database, I can see that the oc_flow_operations table only includes the columns: 'id, class, name, checks, operation'. |
@cabaretboy good catch. @rullzer we should make sure this makes it into the next beta to avoid breaking instances... |
the above is about oc_flow_operations table but in my case and the first one it is the oc_flow_operations_scope table: In AbstractMySQLDriver.php line 42: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_flow_operations_scope' doesn't exist In PDOConnection.php line 90: In PDOConnection.php line 88: maintenance:repair [--include-expensive] Any idea how the oc_flow_operations_scope table should look like? |
So I'm not sure how this happens as every test I throw at it it works. but @daita is running more checks. Hopefully he can find something. |
I am also looking into it, installed a clean one on localhost, passed the same message but with a repair it worked and the upgrade as well. With the information on localhost I was able to create the _scope table and than run into the same problem as @cabaretboy had so manually edited the oc_flow_operations table and added the missing entity and events rows. If I run a maintenance:repair everything looks fine but when I do an upgrade, the upgrade deletes the entity and events again and fails and when I do an maintenance:repair again it fails as well: Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing 'UPDATE |
It is almost as if for some reason on your systems the Migration is not run. Could one of your try with a debugger (or just stupidly with a var_dump or something) in https://github.com/nextcloud/server/blob/master/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php#L25 |
I have the same problem with v18 RC1.
I looked at the code and noticed that in the function 'changeSchema(...)' after 'createTable('flow_operations')' there are only column entries for 'id', 'name', 'class', 'checks', 'operation'. But no 'entity'... I tried add this column into the file, but still no column 'entity' in my database if I run it afterwards... |
Looks like the autoloading of the class doesn't work
|
Managed to continue after commenting server/apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php Line 60 in c7d5b8f
Database is empty after creation, updater fails on this statement. |
I tried to reproduce it today, but to no avail. I set up latest 17 and did the upgrade routine against a DB without any entries in the flow tables, and another attempt with a flow rule. Both went through flawlessly. Same on upgrades of both the private instances of @juliushaertl and me. |
it's added with |
@Sp1l in your case apps weren't loaded as the upgrade procedure was due, therefore the class could not be found indeed. This is expected (like in maintenance mode). |
Just want to prevent the "world" falling on top of me when I update the FreeBSD package... |
@Sp1l no, when in maintenance mode, or the upgrade procedure is due, the apps are not being loaded, until either is resolved. Therefore, when the upgrade routine is pending, occ migrations:status workflowengine cannot resolve anything that belongs to workflowengine, as it is also implemented as an app. |
I just ran into the same issue, upgrading from Nextcloud 17.0.1 on FreeBSD to Nextcloud 18.
|
I just ran into the same like @gbip posted above, I then cleaned my |
Same here, unable to upgrade from 17.0.2 to 18.0.0, error in the oc_flow_operations_scope. |
Ditto with nextcloud-18.0.0 (MD5: 4ce527afe81d08aeaa47c40bae2e1fdd), upgrade 17.0.2 => 18.0.0 fails with following logs on Debian 10 + nginx setup. |
If you have the same issue please use the issue template https://github.com/nextcloud/server/blob/master/.github/ISSUE_TEMPLATE/Bug_report.md and add a comment to this thread. It's fine to skip expected behaviour, steps to reproduce, etc. but we need the basic system information, configuration export and logs (if they look helpful). I debugged a issue with multiple apps_paths recently. Maybe that's related and the information (multiple apps_paths yes/no) important (at least to me). cc @ivdok @tasagore If possible please edit your posts and also add it. Thanks 👍 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@chkpnt That's the recommended solution: https://help.nextcloud.com/t/read-this-before-you-update-to-nextcloud-18/68389 If you run into the missing column problem: The current status is that this issue appears if an unsupported way of upgrading your instance is used. For |
@kesselb Thank you, that indeed worked. |
@kesselb Thanks, I added a +1 to that issue. |
I am having same issue. I suspect some of the table updates were not performed during previous upgrades. Funny thing is, that when I go to MySQL table directly and I add column entity manually and then I execute Update procedure, this column gets dropped. And the updater will throw an error that column entity is missing.
This relates to upgrade to 18.0.2 |
I was grateful to find this thread, but for me, running a manual upgrade threw the exact same error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'entity' in 'where clause' Going back to restore my 17.0.4 instance... EDIT: Despite noting in this thread and others that manually adding the missing column may not work, gave it a go anyway, per MagelanM below. This workaround allowed me to upgrade, and with the web interface, no less. |
I had the same problem while update to Nextcloud 18.0.2.
|
I'm pretty sure when I did the manual update, |
@MagelanM @vladaman @tonyshangrila did you all follow the upgrade instructions and ensured that the new files were not simply copied over the existing ones? |
Yes, I did. |
@tonyshangrila can you provide your nextcloud.log from your upgrade attempt? |
@blizzz - I'm sorry to say that I can't. :( Upon taking a look at my logs, I noticed an entirely different SQL error that been thrown 2 or 3 times a second since I upgraded to 18. My log effectively gets flushed at 200 MB, and I don't have anything dated prior to 3/24 now. Off to chase down that issue! |
Just to mention it, I had an error during NC18 upgrade about the same database table: #18327 |
@kesselb I just tried again, 17.0.6 -> 18.0.7 in preparation for upgrading to 19, and the exact same thing happened. I followed step 9 in https://docs.nextcloud.com/server/18/admin_manual/maintenance/manual_upgrade.html to a T (i.e., didn't update the workflowengine myself). This time, once I issued: ALTER TABLE oc_flow_operations ADD COLUMN entity CHARACTER VARYING(256) NOT NULL DEFAULT '' and re-running So something must have changed in either 17 or 18 between now and then, but at least there is an upgrade path, even if it's a little rocky. (ETA: I'm running Postgres.) |
Here is my experience with upgrading Nextcloud from
Go to Then look at the Administration tab for the Security & setup warnings
Fix:
|
Jep that is expected. The admin panel would have explained that missing indices as well as missing columns are not added automatically by the updater, as this can be very time consuming. So the following two steps can actually always be appended, when the possible additional offline/maintenance time is okay:
including the sudo/docker/PHP prefix of course. |
#18265 (comment) this one worked for me, but I had to create varchar(256) (not varchar[256]) using SQlite.
|
I have the same issue upgrading from 19.0.4.2 to 20.0.0.9 I have the column
but I still receive the error :/
PS: This #19058 (comment) and #19058 (comment) resolved my issues. |
Hi, I too have had to manually add the entity column in mariadb, now however I get multiple of these errors a second:
Already ran repair, add-missing-indices and add-missing-columns. Everything seems to be working, I can only see the error from the logs. Thanks |
Is
|
+1. Fixed it for me (17.0.10 -> 18.0.12 update). (Thanks @kesselb!) |
Is this Issue still valid in NC21.0.2? If not, please close this issue. Thanks! :) |
Steps to reproduce
Expected behaviour
Nextcloud should upgrade to 18-Beta1
Actual behaviour
SQL Issue:
Server configuration
Operating system:
Linux
Web server:
Apache
Database:
MariaDB
PHP version:
7.3.4
Nextcloud version: (see Nextcloud admin page)
17.0.1 -> 18-beta1
Updated from an older Nextcloud/ownCloud or fresh install:
fresh and clean install
The text was updated successfully, but these errors were encountered: