Need help recreating oc_jobs

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 31.0.1
  • Operating system and version (e.g., Ubuntu 24.04):
    • unraid 6.12
  • Web server and version (e.g, Apache 2.4.25):
    • unknown
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • ngnx/swag unshure version
  • PHP version (e.g, 8.3):
    • unshure
  • Is this the first time you’ve seen this error? (Yes / No):
    • yes
  • When did this problem seem to first start?
    • last week
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • yes, cloudflare

Summary of the issue you are facing:

last week nextcloud updated (auto-updated, i know i shouldnt) and was greeted with a bunch of errors saying “incorect row format” so i folowed a few other support threads to fix that, unfortunately none of them worked and i got errors for all of them but at some point nextcloud stopped with the errors and i thought i had it fixed, nextcloud was working fine for a few days after then i opened it up again and was met with a message saying internal error. find out my mariadb install wasnt starting because it thought the entire database was either missing or corrupt. eventualy got it figured out ended up having to manualy copy an old backup (from a few weeks ago) of the database into the mariadb folder and everything seemd fine, but my nextcloud is still in maintenance mode, check logs it doesnt say anything is wrong, go to use occ to run a repair on nextcloud and now it says oc_jobs is corrupt, it refuses to fix it just tells me its corrupt. the weird part is i could still see it in phpmyadmin and read its data (unfortunatly i forgot to export the table beforehand) ended up dropping oc_jobs table from the database and recreated it…but now im stuck, nextcloud wants me to update in order to fix the database, but it wont start the update because oc_jobs is missing columns, occ db:add_missing_columns runs, and completes but it doesnt add any columns to oc_jobs.
i would like some help in re-creating the oc_jobs table, what are the columns its suposed to have as well as formating as i have not been able to find this information online

Steps to replicate it (hint: details matter!):

  1. update to 31.0.1 from 31.0.0?
  2. try to update database row format
  3. database corruption
  4. now only 1 file is corrupt and now missing

here is the last bit of the error log

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

{
    "system": {
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "192.168.1.3:444",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "overwritehost": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "dbtype": "mysql",
        "version": "31.0.0.18",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "updater.release.channel": "stable",
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [
            "admin"
        ],
        "twofactor_enforced_excluded_groups": [
            "Test",
            "users"
        ],
        "maintenance_window_start": 5,
        "maintenance": true,
        "theme": "",
        "loglevel": 1,
        "default_phone_region": "CA",
        "filelocking.enabled": "true",
        "upgrade.disable-web": true,
        "onlyoffice": {
            "editors_check_interval": 0
        },
        "app_install_overwrite": [
            "extract",
            "imageconverter",
            "files_rightclick",
            "video_converter",
            "onlyoffice",
            "metadata",
            "camerarawpreviews"
        ],
        "forbidden_filename_basenames": [
            "con",
            "prn",
            "aux",
            "nul",
            "com0",
            "com1",
            "com2",
            "com3",
            "com4",
            "com5",
            "com6",
            "com7",
            "com8",
            "com9",
            "com\u00b9",
            "com\u00b2",
            "com\u00b3",
            "lpt0",
            "lpt1",
            "lpt2",
            "lpt3",
            "lpt4",
            "lpt5",
            "lpt6",
            "lpt7",
            "lpt8",
            "lpt9",
            "lpt\u00b9",
            "lpt\u00b2",
            "lpt\u00b3"
        ],
        "forbidden_filename_characters": [
            "<",
            ">",
            ":",
            "\"",
            "|",
            "?",
            "*",
            "\\",
            "\/"
        ],
        "forbidden_filename_extensions": [
            " ",
            ".",
            ".filepart",
            ".part"
        ]
    }
}

any help is of course usefull, i have tried many things to make this work but am up for trying anything anyone suggests at this point. i am also not very good with mariadb or cli, i can fumble my way around them but cannot makeup most commands myself. and once o get this figured out and fully working again i will be implementing a more robust backup system of the database (currently just backing up the appdata for mariadb on a weekly basis, but will be trying to set something up to do a proper backup of mariadb, and maby even a database dump on a weekly basis aswell) sorry for the long story, just trying to help with as many details as i can remember after pullin gmy hair out for the last week

update for anyone out there whit the same issue, i ended up getting it to work turns out it was more than likely my mariadb that was corrupt because restoring the docker image backup for mariadb that i made last night (witch was one that was a “corrupt” one) suddenly works again. and i swear i tried it previously as well and it was still corrupt. but for anyone who comes across this in the future i have screenshots of heidiSQL for oc_jobs showing its structure to help anyone else seeing as this information doesn’t seem to be available online (nextcloud should have documentation for the structure of the various database files…atleast in my opinion)