Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. DB migration failed after upgrade to 9.0.13

DB migration failed after upgrade to 9.0.13

Scheduled Pinned Locked Moved Unsolved Support
databasemigrations
2 Posts 2 Posters 9 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dd4y
    wrote last edited by joseph
    #1

    Description

    After upgrade from 8 to 9.0.13 dashboard not working. With the hep of other post, I noticed my tasks table doesn't have completed column, so adding it manually solved the issue with dashboard not loading.

    Steps to reproduce

    After running troubleshoot script:
    [FAIL] Database migrations are pending. Last migration in DB: /20250618200400-fix-charset-collate.js. Last migration file: /20251110084515-cloudflare-add-defaultProxyStatus.js.
    Please run 'cloudron-support --apply-db-migrations' to apply the migrations.

    After running --apply-db-migrations:

    Logs

    [ERROR] AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Duplicate entry '20647655-d757-412a-8a67-3b6ff3d224a3-oidc' for key 'oidcClients.PRIMARY'
    at /home/yellowtent/box/node_modules/db-migrate/lib/commands/on-complete.js:15:14
    at tryCatcher (/home/yellowtent/box/node_modules/bluebird/js/release/util.js:16:23)
    at Promise.successAdapter (/home/yellowtent/box/node_modules/bluebird/js/release/nodeify.js:22:30)
    at Promise._settlePromise (/home/yellowtent/box/node_modules/bluebird/js/release/promise.js:601:21)
    at Promise._settlePromiseCtx (/home/yellowtent/box/node_modules/bluebird/js/release/promise.js:641:10)
    at _drainQueueStep (/home/yellowtent/box/node_modules/bluebird/js/release/async.js:97:12)
    at _drainQueue (/home/yellowtent/box/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/home/yellowtent/box/node_modules/bluebird/js/release/async.js:102:5)
    at Async.drainQueues [as _onImmediate] (/home/yellowtent/box/node_modules/bluebird/js/release/async.js:15:14)
    at process.processImmediate (node:internal/timers:485:21)
    at Packet.asError (/home/yellowtent/box/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/yellowtent/box/node_modules/mysql2/lib/commands/command.js:29:26)
    at Connection.handlePacket (/home/yellowtent/box/node_modules/mysql2/lib/base/connection.js:477:34)
    at PacketParser.onPacket (/home/yellowtent/box/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/yellowtent/box/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/yellowtent/box/node_modules/mysql2/lib/base/connection.js💯25)
    at Socket.emit (node:events:519:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5)
    at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
    2025-12-07T16:47:15 ==> start: DB migration failed
    [FAIL] Database migrations failed

    Cloudron Version

    9.0.13

    1 Reply Last reply
    1
    • nebulonN Away
      nebulonN Away
      nebulon
      Staff
      wrote last edited by
      #2

      Changing the database schema manually is usually always a bad idea. It becomes very hard to apply the database migration scripts which have to be run one-after-the-other and with manual changes it is unknown at which schema state the database is and if subsequent migrations can work.

      Do you know exactly which SQL query you ran manually to update the schema? If so ideally revert that and run db migration script again. It probably will just show the same error as before, so we can work from that on.

      Duplicate entry '20647655-d757-412a-8a67-3b6ff3d224a3-oidc' for key 'oidcClients.PRIMARY' it seems like you have duplicate records in the oidcClients table. Can you run:

      mysql -uroot -ppassword box -e "SELECT  * from oidcClients"
      

      Then find the duplicates and remove one of them. Then rerun the migration script again.

      1 Reply Last reply
      2
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Bookmarks
      • Search