Repository navigation
Database error when upgrading from 5.3.2 to 5.3.5: Column not found: 1054 Unknown column 'option_type' in 'SET' #3562
Description
Please use the 👍 reaction to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!
Describe the bug
When doing the upgrade of forms 5.3.2 to 5.3.5, I got this error:
Updating <forms> ...
Exception: Database error when running migration 050300Date20260716000000 for app forms
An exception occurred while executing a query: SQLSTATE[42703]: Undefined column: 7 ERROR: column "option_type" does not exist
LINE 1: ...oc_forms_v2_options" SET "option_type" = $1 WHERE "option_ty...
^
Update failed
I had to disable the app with "occ app:disable forms" to get the system up and running again. (but ofcourse, the forms app is now not running anymore)
To Reproduce
Steps to reproduce the behavior:
- Run nextcloud with forms 5.3.2
- Do the upgrade (as requested) which upgrades to 5.3.5
- system not reachable anymore (reverse-proxy gives a "bad gateway")
- restart podman to make the system reachable again
- start nextcloud -> get message an update requires an upgrade
- do upgrade -> error again -> host not reachable again
- restart podman
- log into podman container with "podman exec "
- do occ upgrade or occ app:update -> gives same error
Expected behavior
upgrade to latest version with error
Screenshots
If applicable, add screenshots to help explain your problem.
Nextcloud (please complete the following information):
- Nextcloud-Version: 33.0.3 (Hub 26 winter)
- Forms-Version: was: 5.3.2, no 5.3.5
Desktop (please complete the following information):
- OS: ubuntu
- Browser [e.g. chrome, safari]: firefox
- Version [e.g. 22]: 153.0.1
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Browser log
Open your console, reload your page and/or do the action leading to this issue and copy/paste the log in this thread.
How to access your browser console (Click to expand)
Chrome
- Press either CTRL + SHIFT + J to open the “console” tab of the Developer Tools.
- Alternative method:
- Press either CTRL + SHIFT + I or F12 to open the Developer Tools.
- Click the “console” tab.
Safari
- Press CMD + ALT + I to open the Web Inspector.
- See Chrome’s step 2. (Chrome and Safari have pretty much identical dev tools.)
IE9
- Press F12 to open the developer tools.
- Click the “console” tab.
Firefox
- Press CTRL + SHIFT + K to open the Web console (COMMAND + SHIFT + K on Macs).
- or, if Firebug is installed (recommended):
- Press F12 to open Firebug.
- Click on the “console” tab.
Opera
- Press CTRL + SHIFT + I to open Dragonfly.
- Click on the “console” tab.
Additional context
Add any other context about the problem here.
Thanks to @AndyScherzinger we added a fix for future migrations.
For a workaround you could use the following SQL commands:
ALTER TABLE oc_forms_v2_options ADD COLUMN option_type VARCHAR(255) DEFAULT 'choice';
UPDATE oc_forms_v2_options SET option_type = 'choice' WHERE option_type IS NULL;
after that you should be able to re-enable the Forms app
Activity
[-]datfabase error when upgrading from 5.3.2 to 5.3.5[/-][+]database error when upgrading from 5.3.2 to 5.3.5[/+]on1arf commentedon Aug 5, 2026
Hi,
Can somebody already say what database / table is used by the forms app and what the scheme of the table is supposed to look like?
Chartman123 commentedon Aug 5, 2026
@on1arf probably not a bug but a problem with your instance.
The table is mentioned in the error message:
oc_forms_v2_optionsAnd it looks like your missing the column
option_typewhich should have the following configuration:freechelmi commentedon Aug 17, 2026
Please could we re-open this ?
This update crashed our nextcloud and this will happen to most people using forms
it seems the SQL migration script in forms for this version is missing something....
Chartman123 commentedon Aug 17, 2026
I don't think so, there would be many more reports about this error...
freechelmi commentedon Aug 17, 2026
I see your point but using fresh
Nextcloud-Version: 33.0.3 and 32.0.6
and migrating 5.3.2 to 5.3.5
Reproduce exactly this problem
So the least we could do is to leave this bug open
Chartman123 commentedon Aug 17, 2026
@freechelmi and you can reproduce it every time? Could you please post the server logs from the update?
Also: what happens when you do the upgrade step by step?
And can you please confirm that your DB has the
option_typecolumn in 5.3.2?Which installation type are you using? Which database?
[-]database error when upgrading from 5.3.2 to 5.3.5[/-][+]Database error when upgrading from 5.3.2 to 5.3.5: Column not found: 1054 Unknown column 'option_type' in 'SET'[/+]ReimarBauer commentedon Aug 25, 2026
@Chartman123 I do have this problem too. I think I answered everything you need in your template.
Let me know if I can try something. I am currently thinking about restoring the old forms version
Chartman123 commentedon Aug 25, 2026
Thanks to @AndyScherzinger we added a fix for future migrations.
For a workaround you could use the following SQL commands:
after that you should be able to re-enable the Forms app
fix(migration): make option_type migration self-sufficient
fix(migration): make option_type migration self-sufficient