v0.31.5: missing migration for shmSize breaks backup cron jobs and Create Backup (column backups_postgres.shmSize does not exist)

オープン 初心者向け
#6,151 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
docker, postgresql, typescript

調査の方向性

issueに記載された packages/server/src/db/schema/ 以下のスキーマファイルを読み、apps/dokploy/drizzle/ のマイグレーション、特に0203から0207までのマイグレーションと比較してください。どのテーブルが shmSize を宣言しているか、またマイグレーションジャーナルにそれを追加するマイグレーションが含まれているかを確認してください。アップグレード後に必要なカラムが存在し、バックアップcronの設定、Backupsタブ、Create Backupが動作すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

To Reproduce
  1. Run Dokploy v0.31.4 with at least one scheduled database backup (we have several Postgres backups on Docker Compose services).
  2. Upgrade to v0.31.5 from the UI ("Update" button). The migrations run and the log prints Migration complete.
  3. Watch the container log at startup: after Setting up cron jobs.... it prints Main Server Error Error: Failed query: select "backups"."backupId", ... with the cause column backups_postgres.shmSize does not exist.
  4. Open a Docker Compose service, go to Backups and click Create Backup for a Postgres service.
Current vs. Expected behavior

Current

  • Startup cron setup fails, so no database backup is scheduled after the upgrade (the nightly backups silently stop).
  • The Backups tab cannot load its list (same query, same error).
  • Create Backup shows "Error creating a backup", but the row is inserted before the failing read-back. Clicking it four times created four enabled duplicate backup jobs that could not be seen or deleted from the UI.
[cause]: Error [PostgresError]: column backups_postgres.shmSize does not exist
  routine: 'errorMissingColumn'

Expected: v0.31.5 ships a migration for every column its schema queries.

Cause, as far as I can tell: git diff v0.31.4 v0.31.5 adds shmSize: text("shmSize") to packages/server/src/db/schema/{application,postgres,mysql,mariadb,mongo,redis}.ts, but none of the migrations added in that range (0203_cooing_prodigy to 0207_sensitive_action_verification) creates the column, and no SQL file under apps/dokploy/drizzle/ at v0.31.5 mentions shmSize. The v0.31.5 image's _journal.json ends at 0207, and after the upgrade the database has all 208 migrations but no shmSize column on any table.

Provide environment information
Operating System:
  OS: Ubuntu 24.04.2 LTS
  Arch: x86_64
Dokploy version: v0.31.5 (upgraded from v0.31.4 via the UI on 2026-11-30)
Docker: 28.3.3
Dokploy database: postgres:16
VPS Provider: self-hosted VPS
What applications/services are you tying to deploy?
  Docker Compose stacks with Postgres services, backed up with scheduled database backups to an S3-compatible (MinIO) destination.
Which area(s) are affected? (Select all that apply)

Databases, Docker Compose, Remote server

Are you deploying the applications where Dokploy is installed or on a remote server?

Both

Additional context
  • Workaround that worked for us: roll the service back to the previous image with docker service update --image dokploy/dokploy:v0.31.4 dokploy. v0.31.4 ignores the columns added by migrations 0203 to 0207, cron jobs schedule again, and the Backups tab and Create Backup work.
  • Any duplicate backup rows created while on v0.31.5 have to be removed in the Dokploy database, and Dokploy restarted, because the scheduler keeps the jobs it loaded at startup in memory.
  • A likely fix is a migration such as ALTER TABLE "<table>" ADD COLUMN "shmSize" text; for the six tables above. With that fix, instances that roll back to v0.31.4 and later upgrade again will pick it up normally.
Will you send a PR to fix it?

No

主要言語
TypeScript
スター
38.8k
フォーク
3.2k
平均マージ
1日 10時間
マージ済み PR(30日)
110

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Dokploy/dokploy のほかの issue

Dokploy/dokploy の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。