A check constraint the schema cannot name can never be retired, and keeps enforcing the old rule
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
Start by tracing column-level checkConstraint handling through the migrator and compare it with the legacy constraint names shown for usage_tracking.event_type. Use docs/reports/dataprovider-migrate-defects.md as the reproduction reference; done means a schema change can retire the pre-existing constraint and a newly allowed value is accepted after migration.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
A column-level checkConstraint has no name field, so the migrator can only ever rewrite the constraint it created itself (<table>_<column>_chk). A check constraint that predates DataProvider, or was added by hand, can never be retired — and it keeps enforcing the old rule after the schema changes it.
Found by TradiSite on a production-shaped postgres:17 with 0.9.12-beta.
Reproduction
- Migrate a schema with a column
checkConstraintonusage_tracking.event_type. DataProvider createsusage_tracking_event_type_chk. - Simulate a legacy duplicate, as TradiSite production has:
ALTER TABLE public.usage_tracking ADD CONSTRAINT usage_tracking_event_type_check CHECK (event_type IN (...)); - Change the allowed values in the YAML and migrate again. DataProvider rewrites
_chkand leaves_checkin place. - Insert a row using a newly allowed value:
ERROR: new row for relation "usage_tracking" violates check constraint "usage_tracking_event_type_check"
Why it matters
The migration reports success, the schema says the value is allowed, and the database rejects it. For an asynchronous writer that is silent data loss: the row is dropped and nothing surfaces it. TradiSite had to freeze event_type at exactly what production already enforces (their PR #140) rather than migrate at all.
Fix wanted
Either let a column checkConstraint carry an explicit name, or let the schema declare legacy constraint names to drop. Either lets pre-DataProvider constraints be retired through the sanctioned tool instead of by hand.
Related: #105. Reproduction write-up: docs/reports/dataprovider-migrate-defects.md in the TradiSite repository.
- Lingua principale
- C#
- Stelle
- 67
- Fork
- 4
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
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à 2/5 1-3 ore Idoneità per principianti 82/100
Nimblesite/DataProvider#72 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
Nimblesite/DataProvider#108 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
Nimblesite/DataProvider#106 ·
-
migrate --allow-destructive drops EVERY foreign key when the database already matches the schemaAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
Nimblesite/DataProvider#105 · 3 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 76/100
Nimblesite/DataProvider#104 ·
Tutte le issue di Nimblesite/DataProvider
Issue simili
-
go 🏃 testing 🧪
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
valkey-io/valkey-glide#7239 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
SubtitleEdit/subtitleedit#15462 ·
I maintainer di solito rispondono entro 1 giorno
-
:watch: Not Triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
comp:instrumentation.aspnetcore
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
open-telemetry/opentelemetry-dotnet-contrib#5427 ·
I maintainer di solito rispondono entro 1 giorno
-
[feature request] Condier making `TelemetrySpan`'s constructor and `Activity` property publicApertaenhancement needs-triage pkg:OpenTelemetry
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
open-telemetry/opentelemetry-dotnet#7851 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno