Skip to content

Database error when upgrading from 5.3.2 to 5.3.5: Column not found: 1054 Unknown column 'option_type' in 'SET' #3562

Closed

Description

@on1arf

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:

  1. Run nextcloud with forms 5.3.2
  2. Do the upgrade (as requested) which upgrades to 5.3.5
  3. system not reachable anymore (reverse-proxy gives a "bad gateway")
  4. restart podman to make the system reachable again
  5. start nextcloud -> get message an update requires an upgrade
  6. do upgrade -> error again -> host not reachable again
  7. restart podman
  8. log into podman container with "podman exec "
  9. 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.

Image

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:
    1. Press either CTRL + SHIFT + I or F12 to open the Developer Tools.
    2. 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

  1. Press F12 to open the developer tools.
  2. 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):
    1. Press F12 to open Firebug.
    2. Click on the “console” tab.

Opera

  1. Press CTRL + SHIFT + I to open Dragonfly.
  2. Click on the “console” tab.

Additional context
Add any other context about the problem here.

Pinned by Chartman123

Activity

  1. added
    bugSomething isn't working
    0. Needs triagePending approval or rejection. This issue is pending approval.
    on Aug 4, 2026
  2. added theissue type on Aug 4, 2026
  3. changed the title [-]datfabase error when upgrading from 5.3.2 to 5.3.5[/-] [+]database error when upgrading from 5.3.2 to 5.3.5[/+] on Aug 4, 2026
  4. on1arf commented on Aug 5, 2026

    @on1arf
    Author

    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?

  5. Chartman123 commented on Aug 5, 2026

    @Chartman123
    Collaborator

    @on1arf probably not a bug but a problem with your instance.

    The table is mentioned in the error message: oc_forms_v2_options

    And it looks like your missing the column option_type which should have the following configuration:

    • type string
    • notnull => false
    • default => 'choice'
  6. freechelmi commented on Aug 17, 2026

    @freechelmi

    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....

  7. Chartman123 commented on Aug 17, 2026

    @Chartman123
    Collaborator

    I don't think so, there would be many more reports about this error...

  8. freechelmi commented on Aug 17, 2026

    @freechelmi

    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

  9. Chartman123 commented on Aug 17, 2026

    @Chartman123
    Collaborator

    @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_type column in 5.3.2?

    Which installation type are you using? Which database?

  10. changed the title [-]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'[/+] on Aug 25, 2026
  11. ReimarBauer commented on Aug 25, 2026

    @ReimarBauer

    @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

  12. Chartman123 commented on Aug 25, 2026

    @Chartman123
    Collaborator

    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

  13. pinned this issue on Aug 26, 2026
  14. added a commit that references this issue on Aug 26, 2026
    a9ec992
  15. added a commit that references this issue on Sep 7, 2026
    8801371
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending approval or rejection. This issue is pending approval.bugSomething isn't workingneeds infoNot enough information provided

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions