Add database migration commands to Cornucopia CLI

Aperta
#309 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
postgresql, rust
Ambito
cli, databases

Direzione di ricerca

Start by reading the Cornucopia CLI entry points and how the project currently connects to PostgreSQL; the issue does not name files or tests. Work out how migration files are discovered and ordered, how commands should run or revert them, and how .env supplies DATABASE_URL. Done means the requested cornucopia migrate commands behave consistently for sequential or timestamped migrations; database management commands are an additional open question.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the problem

It would be convenient to have the CLI automatically search the migrations directory for sequential or timestamped migrations and run them in order.

Also, having the CLI source the .env file in the current directory for the DATABASE_URL environment variable would be a good addition as well.

Describe the solution you'd like

I'd like to have the commands cornucopia migrate {add | run | revert} added, alongside potentially some database management management commands like cornucopia database {create | drop | reset | setup}.

Alternatives considered

Just using the SQLx CLI for it.

Additional context

No response

Importance

Would make my life easier

Lingua principale
Rust
Stelle
1.2k
Fork
77
Merge medio
5g 12h
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cornucopia-rs/cornucopia

Tutte le issue di cornucopia-rs/cornucopia

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.