Support "rename field" in automatic migration generator
Los mantenedores suelen responder en 1 día
@Soroushsrd ya está trabajando en esto.
Desde el 15/4/2025.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
We should support renaming fields in the automatic migration generator.
This is more complicated than most of the other operations. This is because we can't reliably detect renaming fields (we only see that a field has been removed and then created). For starters, we could detect if a field was renamed by keeping all of its properties intact. Then, we could add some heuristics (like for instance, we see that a field was removed but then recreated with most of its original properties). This, however, needs to be interactive—we need to ask the developer if they actually renamed the field (and then create either a rename, or delete+create operations depending on their reply).
The entry point is probably somewhere in the make_alter_model_operations function: https://github.com/cot-rs/cot/blob/2bbb09699bf7b74c41bb323338a02c528de1acff/cot-cli/src/migration_generator.rs#L329
This will require adding a new OperationInner variant: https://github.com/cot-rs/cot/blob/2bbb09699bf7b74c41bb323338a02c528de1acff/cot/src/db/migrations.rs#L460
Note that the "rename field" operation will need to store the old name of the field, so that an implementation of Operation::backwards can be created.
- Lenguaje dominante
- Rust
- Estrellas
- 1.1k
- Forks
- 57
- Merge medio
- 17 h 39 min
- PR fusionados (30 d)
- 12
Preparar el entorno
- Incluye un Dockerfile o un 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 cot-rs/cot
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Add changelog pageAbiertoA-docs
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Add CLI Reference pageAbiertoA-docs
Dificultad 2/5 Medio día Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Add Request and Extractor DocsAbiertoA-docs
Dificultad 2/5 Medio día Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Add Routing docsQuizá libre de nuevo @ElijahAhianyo la tomó hace 43 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
Todos los issues de cot-rs/cot
Issues similares
-
Dificultad 2/5 Medio día Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
code-quality parser
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
eventflux-io/eventflux#218 ·
Los mantenedores suelen responder en 1 día
-
StartSso docs say an option requires the built-in AuthnRequest renderer, which is now the only oneAbiertodocumentation needs-triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
marketing
Dificultad 2/5 Medio día Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día