Migrating data all site down
-
Hi All
Just went to login not the server was down run the test got this error and run the loudron-support --apply-db-migrations and then got the next error
═══ Cloudron Platform ═══ [OK] MySQL is running [OK] nginx is running [OK] Dashboard cert is valid (46 days remaining, expires Oct 24 03:06:06 2026 GMT) [OK] dashboard is reachable via loopback [FAIL] Database migrations are pending. Last migration in DB: /20260521193000-mailsettings-create-table.js. Last migration file: /20260902155100-apiTokens-add-role.js. [INFO] Please run 'cloudron-support --apply-db-migrations' to apply the migrations. 2026-09-08T02:16:18 ==> start: Migrating data [ERROR] AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Duplicate column name 'skipFromValidation' 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:534:21) at Packet.asError (/home/yellowtent/box/node_modules/mysql2/lib/packets/packet.js:833: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:555:34) at PacketParser.onPacket (/home/yellowtent/box/node_modules/mysql2/lib/base/connection.js:104: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:112:25) at Socket.emit (node:events:509:28) at addChunk (node:internal/streams/readable:563:12) at readableAddChunkPushByteMode (node:internal/streams/readable:514:3) at Readable.push (node:internal/streams/readable:394:5) at TCP.onStreamRead (node:internal/stream_base_commons:189:23) 2026-09-08T02:16:19 ==> start: DB migration failed [FAIL] Database migrations faile -
This looks like the migration already ran then and it got interrupted or crashed midway. Please enable remote ssh support for us https://docs.cloudron.io/support#remote-support and send a mail to support@cloudron.io with your Cloudron details. Then we can take a direkt look at fixing this.
-
Unfortunately, in sql, schema changes are not part of a transaction. You can drop that column by hand if you know SQL (or contact us on support as @nebulon said).
Quick fix: Edit the file
/home/yellowtent/box/migrations/20260526210000-mail-relay-tokens-and-mailbox-from-validation.js. Comment out this line (this is the first line in theupfunction):// await db.runSql('ALTER TABLE mailboxes ADD COLUMN skipFromValidation BOOLEAN DEFAULT 0');Then run migration again, should work
-
not 100% sure what I am look at sent the remote access to support it after 6pm here
give you some to so see why it may have not worked tooMichael
@Nozy I replied from support. The issue seems to be that the box code was created by hand as "CREATE DATABASE box" . However, this gets the incorrect default collation and migrations fail. The correct command is
CREATE DATABASE IF NOT EXISTS box CHARACTER SET utf8mb4 COLLATE utf8mb4_bin. I have fixed the docs to state this. -
G girish has marked this topic as solved
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login