Integrity check compares a cast-stripped default against the raw one — every converged migrate exits non-zero
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 64/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C#
- Estrellas
- 68
- Forks
- 4
- Merge medio
- 50 min
- PR fusionados (30 d)
- 2
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Nimblesite/DataProvider
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 92/100
Nimblesite/DataProvider#137 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Nimblesite/DataProvider#72 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Nimblesite/DataProvider#121 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
Nimblesite/DataProvider#108 ·
Los mantenedores suelen responder en 1 día
-
A check constraint the schema cannot name can never be retired, and keeps enforcing the old ruleAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Nimblesite/DataProvider#107 ·
Los mantenedores suelen responder en 1 día
Todos los issues de Nimblesite/DataProvider
Issues similares
-
kronos:develop:queued priority:P0
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
nopSolutions/nopCommerce#8512 ·
Los mantenedores suelen responder en 4 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
modelcontextprotocol/csharp-sdk#2061 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día