Feature request: Repeatable migrations for managing functions and views
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- postgresql, typescript
- Área
- database
Línea de trabajo
Empieza leyendo los hooks afterCurrent y afterAllMigrations y comparando cómo reacciona el modo watch a current.sql con cómo gestiona el modo migrate las migraciones ya aplicadas. Define el comportamiento de las migraciones repetibles, incluida la detección de cambios y la ejecución para objetos de base de datos, y añade después cobertura para ambos modos y para los cambios de checksum.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Feature description
Flyway has the concept of repeatable migrations that are (re-)applied to a database on migrate every time their checksum changes.
This differs from the 'current' migration concept in Graphile Migrate, which as far as I understand is purely for development purposes.
Repeatable migrations are very useful for managing database objects whose definition can then simply be maintained in a single file in version control. They are typically used for
* (Re-)creating views/procedures/functions/packages/...
* Bulk reference data reinserts
Implementing #209 would probably make this possible with hooks, but I have found it such a useful concept that I think it warrants consideration as a feature.
Motivating example
I've used this Flyway feature on many projects to manage stored procedures and functions and am really missing it now that I am using Graphile Migrate.
I've tried replicating the functionality with the afterCurrent and afterAllMigrations hooks, but:
- In
watchmode, I have to go and make a dummy edit tocurrent.sqlin order to pick up the changes to my "repeatable" migrations. - In
migratemode, the "repeatable" migrations don't run at all because the migrations have all been applied already.
Supporting development
I [tick all that apply]:
(I'd love to implement this myself but realistically don't think I would have time, but am happy to assist otherwise).
- 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 ❤️
- have an active support or consultancy contract with Graphile
- Lenguaje dominante
- TypeScript
- Estrellas
- 836
- Forks
- 71
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin 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 graphile/migrate
-
Partition migrations folderAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 45/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
-
🐛 bug
Dificultad 3/5 1-2 días Aptitud para principiantes 42/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Todos los issues de graphile/migrate
Issues similares
-
foreground-up-signals-live: delivery-repair cell expects a spawn suggestion status no longer printsAbiertobug triage:owned
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
e2e-failure ready-to-code
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
redhat-developer/rhdh-plugin-export-overlays#4905 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
directus/directus#28558 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
review: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
1lck/Lithe-IDEA#2432 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
cloudflare/workers-sdk#17189 ·
Los mantenedores suelen responder en 1 día