-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
"Undefined column: 7 ERROR: column c.calendartype does not exist" after upgrade from 16.0.4 to 17.0.0 #17697
Comments
Hi, Exception that I use MySql instead of PostgreSQL. The attempt to add the field: "oc_calendartype" to the table fails because the field is deleted from the table every time I try to upgrade again. Alter Table: After changing the table, it is filled with the field and the value 0. After a new upgrade attempt, the field is removed from the table and runs on the above error. |
This comment has been minimized.
This comment has been minimized.
Odd, |
Ouch 🙈
Scary. Have not found any code that deletes this column 🤔 |
mind, that in my opening comment I mentioned that I have 2 domains. The other updated fine. The faulty one only had an issue with the calendars in the past. Not sure that is related with NilixMaster. |
Just had the same problem upgrading from 15.x to 16.0.5 using the downoaded zip. |
@andreas-p that worked well as it seems. Now I'm logged in and indeed this even repaired my calendar on that cloud. The incompatible apps of calendar and contacts might have caused it? I am now logged in and can view the calendar without any particular calendar app installed, other than default. Thank you. Either this is worth improving the code or if you need something, I'll try to supply it. Or close it, if no need to work on it. |
Hi I got the same issue while updating from 16.0.4 to 16.0.5 and I don't know how to resolve it |
I also have the same issue with the column deleting itself after adding it in manually. This is an upgrade from 16.0.4 to 17.0.0. I've had issues with various missing columns in the past that I've had to add manually to resolve problems like this, though this is the first where is hasn't worked (since it deletes it!). Is there a maintenance script that can be run to check each table for the correct columns and column types? |
Also I keep seeing references to a migration process, e.g. (from the link above): What migration? Is there something that should be run before/after the upgrade process? |
No, it is part of the update process and should run automatically |
We identified a possible root of those migration not executed issues: #18265 It's probably not the case for you but just to mention it. You are updating from Nextcloud 12. The update process is to extract the zip into the nextcloud folder. There are two way to make database changes: database.xml (old way), migrations (new way). Both ways are available. If a file |
This description sounds very plausible. It will happen when the previous directories weren't purged completely, but a manual unzip happened over the existing installation. The Integrity check will warn about this, but when it does it's already too late: occ upgrade was already executed. |
also happened to me during update from 17 to 18
That was a “clean” install, not overwriting old version directories. |
so, I think I got it working with these database manipulation steps: ALTER TABLE oc_calendarobjects ADD COLUMN calendartype int(11) default 0 not null;
ALTER TABLE oc_calendarchanges ADD COLUMN calendartype int(11) default 0 not null;
ALTER TABLE oc_calendarsubscriptions ADD COLUMN synctoken VARCHAR(255);
ALTER TABLE oc_cards ADD COLUMN uid VARCHAR(255);
ALTER TABLE oc_calendarobjects_props ADD COLUMN calendartype INT(11) default 0 not null; |
I guess the issue is solved for most of you? |
Steps to reproduce
Expected behaviour
The update should run successfully.
Actual behaviour
Upgrade fails with error message (in browser):
Repair step: Clean up orphan event and contact data
Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing 'SELECT "c"."id" FROM "oc_calendarobjects" "c" LEFT JOIN "oc_calendars" "p" ON "c"."calendarid" = "p"."id" WHERE ("p"."id" IS NULL) AND ("c"."calendartype" = ?)' with params [0]: SQLSTATE[42703]: Undefined column: 7 ERROR: column c.calendartype does not exist LINE 1: ...endarid" = "p"."id" WHERE ("p"."id" IS NULL) AND ("c"."calen... ^
Server configuration
Operating system:
Gentoo
Web server:
Server version: Apache/2.4.41 (Unix)
Server built: Aug 17 2019 06:15:36
Database:
psql (PostgreSQL) 11.5
PHP version:
PHP 7.3.11 (cli) (built: Oct 26 2019 20:02:13) ( ZTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.11, Copyright (c) 1999-2018, by Zend Technologies
Nextcloud version: (see Nextcloud admin page)
17.0.0
Updated from an older Nextcloud/ownCloud or fresh install:
updated from 16.0.4
Where did you install Nextcloud from:
repository
Signing status:
Signing status
-> "Nextcloud will be updated to version 17.0.0" -> updater will try to run again.
No login possible.
List of activated apps:
App list
contact, calendar, see below: ``` If you have access to your command line run e.g.: sudo -u www-data php occ app:list from within your Nextcloud installation folder ``` sudo -u apache php occ app:list :( The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php The current PHP memory limit is below the recommended value of 512MB. Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Enabled: - accessibility: 1.3.0 - activity: 2.10.1 - admin_audit: 1.6.0 - calendar: 1.7.1 - cloud_federation_api: 1.0.0 - contacts: 3.1.4 - dav: 1.9.2 - federatedfilesharing: 1.7.0 - files: 1.12.0 - files_frommail: 0.3.0 - files_pdfviewer: 1.6.0 - files_rightclick: 0.14.2 - files_sharing: 1.8.0 - files_trashbin: 1.6.0 - files_videoplayer: 1.6.0 - gallery: 18.4.0 - lookup_server_connector: 1.5.0 - notifications: 2.4.1 - oauth2: 1.5.0 - provisioning_api: 1.7.0 - theming: 1.7.0 - twofactor_backupcodes: 1.6.0 - updatenotification: 1.7.0 - viewer: 1.1.0 - workflowengine: 1.6.0 Disabled: - comments - encryption - federation - files_external - files_versions - firstrunwizard - logreader - nextcloud_announcements - password_policy - privacy - recommendations - serverinfo - sharebymail - support - survey_client - systemtags - text - user_ldapNextcloud configuration:
Config report
Insert your webserver log here
none other than access logs here.
Insert your Nextcloud log here
Insert your browser log here, this could for example include:
a) The javascript console log
b) The network log
c) ...
The text was updated successfully, but these errors were encountered: