Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support repetable migration #108

Closed
asv opened this issue May 23, 2018 · 3 comments
Closed

Support repetable migration #108

asv opened this issue May 23, 2018 · 3 comments

Comments

@asv
Copy link

asv commented May 23, 2018

In some cases would be convient to migrate not by creating new migration, but by updating an existing one (for example, for update stored procedure / triggers). Flyway, from-JVM-world migration tool, has this feature (https://flywaydb.org/getstarted/repeatable). Are there plans to add this feature to goose, or a workaround for such case?

@VojtechVitek
Copy link
Collaborator

This is not supported by goose.

However, you can easily copy/paste your migration file and run it again, ie. git mv 0001_rerun.sql 0009_rerun.sql should work just fine.

@caseybcessnun
Copy link

Has this feature been added since 2019? Is it being considered? This is ABSOLUTELY a feature I'd appreciate seeing. This would allow change tracking via SCM to track changes to the PRC over time, vs having to look back through all past migrations.

@mfridman
Copy link
Collaborator

No, it has not been added.

But we did add a -no-versioning flag that enables you to apply migrations over and over without tracking them in the database. Afaics, this is effectively repeatable migrations.

There's a bit more details on how that works here: https://pressly.github.io/goose/blog/2021/no-version-migrations/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants