Use comments to show when fixtures were used
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- postgresql, sql, typescript
Direzione di ricerca
Traccia i punti di ingresso della traduzione dell’inclusione delle fixture e della migrazione utilizzando gli esempi current.sql, fixtures/functions/hello.sql e 000001.sql generato presenti nell’issue. Confronta l’output committato e quello non migrato, quindi verifica che l’SQL derivato dalla fixture sia contrassegnato da commenti che identificano la fixture inclusa e i suoi confini.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Feature description
In experimenting with the new fixture feature, I noticed that:
- There is no way to tell in the committed migration that a fixture was used.
- When uncommitting a migration that used a fixture, the fixture contents are inlined back into the migration
It seems like it would be useful to include some comments that indicate it came from a fixture. Maybe something like
current.sql:
select 'foo';
--! include functions/hello.sql
fixtures/functions/hello.sql
create or replace function public.hello() returns text as $$
select 'Hello, world!';
$$ language sql;
translating into 000001.sql
--! Previous: -
--! Hash: sha1:a62f7d32702b880992ad9e2a7753dd977267064a
select 'foo';
--! Included: functions/hello.sql
create or replace function public.hello() returns text as $$
select 'Hello, world!';
$$ language sql;
--! EndIncluded
I'm not deeply familiar with naming conventions of the !-- comments, so of course feel free to suggest better names
Motivating example
I was messing around with the new fixture features and was curious how it handled unmigrations. Admittedly, unmigrating is not a common thing I do, so it's not a huge deal. But as I thought about it, I came to think that even including a comment in the final migration that the statements came from a fixture is a positive addition to help future readers of migrations understand how the migrations were written.
Breaking changes
It seems like a change like this would only affect migrations going forward, so hopefully no breaking changes for anyone who is already on the 2.0 release candidates.
Supporting development
I:
- am interested in building this feature myself
- am interested in collaborating on building this feature
- am willing to help testing this feature before it's released
- am willing to write a test-driven test suite for this feature (before it exists)
- am a Graphile sponsor ❤️ (Just at the "backer" level)
- have an active support or consultancy contract with Graphile
- Lingua principale
- TypeScript
- Stelle
- 836
- Fork
- 71
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun 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 graphile/migrate
-
Partition migrations folderAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
🐛 bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
Tutte le issue di graphile/migrate
Issue simili
-
foreground-up-signals-live: delivery-repair cell expects a spawn suggestion status no longer printsApertabug triage:owned
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
e2e-failure ready-to-code
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
redhat-developer/rhdh-plugin-export-overlays#4905 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
directus/directus#28558 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
review: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
1lck/Lithe-IDEA#2432 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
cloudflare/workers-sdk#17189 ·
I maintainer di solito rispondono entro 1 giorno