Integrity check compares a cast-stripped default against the raw one — every converged migrate exits non-zero
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 64/100
調査の方向性
Start at the post-apply schema integrity check and its comparison with the default read from pg_attrdef; reproduce the report against a converged database or a migration using an explicit ::text default. Done means both values are normalized consistently, the check passes, and migrate exits 0 when no operations are needed.
索引モデルが issue の本文から書いたものです。
説明
Version
DataProviderMigrate 0.9.12-beta.
Summary
The post-apply schema integrity check reports a mismatch between a default and
itself, differing only by the ::text cast:
Migration completed successfully
SCHEMA INTEGRITY CHECK FAILED
public.topup.status: default expected 'pending' but found 'pending'::text
The schema declares exactly what the database contains:
- name: status
type: Text
isNullable: false
defaultValue: "'pending'::text"
One side of the comparison is normalised (cast stripped) and the other is not, so
they can never match for any defaultValue written with an explicit cast.
Impact
This is worse than cosmetic, because it destroys the exit code as a signal:
Phase: all — applying 1 of 1 operation(s):
AddCheckConstraintOperation
Migration completed successfully
SCHEMA INTEGRITY CHECK FAILED
make: *** [migrate] Error 1
The migration applied correctly and the tool still exits non-zero. A fully converged
database does the same:
Schema is up to date — no operations needed
SCHEMA INTEGRITY CHECK FAILED
So an operator cannot distinguish "your migration failed" from "your migration worked
and the checker is comparing a string to itself", and no wrapper can gate on the exit
status. We hit this while diagnosing a real failure (#96) and had to read the log body
to tell the two apart.
Expected
Normalise both sides before comparing — parse the default to a value, or apply the
same cast-stripping to the value read from pg_attrdef that is applied to the schema
value. A converged database should exit 0.
- 主要言語
- C#
- スター
- 68
- フォーク
- 4
- 平均マージ
- 50分
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Nimblesite/DataProvider のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 92/100
Nimblesite/DataProvider#137 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Nimblesite/DataProvider#72 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
Nimblesite/DataProvider#121 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
Nimblesite/DataProvider#108 ·
メンテナーはふだん 1 日以内に返信
-
A check constraint the schema cannot name can never be retired, and keeps enforcing the old ruleオープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
Nimblesite/DataProvider#107 ·
メンテナーはふだん 1 日以内に返信
Nimblesite/DataProvider の issue をすべて見る
似ている issue
-
kronos:develop:queued priority:P0
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
nopSolutions/nopCommerce#8512 ·
メンテナーはふだん 4 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
modelcontextprotocol/csharp-sdk#2061 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信