Integrity check compares a cast-stripped default against the raw one — every converged migrate exits non-zero
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 64/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- C#
- Stelle
- 68
- Fork
- 4
- Merge medio
- 50m
- PR unite (30g)
- 2
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Nimblesite/DataProvider
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 92/100
Nimblesite/DataProvider#137 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Nimblesite/DataProvider#72 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
Nimblesite/DataProvider#121 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
Nimblesite/DataProvider#108 ·
I maintainer di solito rispondono entro 1 giorno
-
A check constraint the schema cannot name can never be retired, and keeps enforcing the old ruleAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
Nimblesite/DataProvider#107 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Nimblesite/DataProvider
Issue simili
-
kronos:develop:queued priority:P0
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
nopSolutions/nopCommerce#8512 ·
I maintainer di solito rispondono entro 4 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
modelcontextprotocol/csharp-sdk#2061 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno