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

Multiple migrators to migrate one database? #1165

Open
uvulpos opened this issue Sep 15, 2024 · 0 comments
Open

Multiple migrators to migrate one database? #1165

uvulpos opened this issue Sep 15, 2024 · 0 comments

Comments

@uvulpos
Copy link

uvulpos commented Sep 15, 2024

Is your feature request related to a problem? Please describe.
I have a go migrator integrated in my application. It migrates all necessary features for the app to run. But now I want to create a integration tests setup, where test data needs to be migrated to the database. Therefore my plan was to use a second migrator. Is it possible to prefix the lock with a certain migrator ID.

Describe the solution you'd like
I would like to tag database versions. This could be by default "default", but also custom tags like "integration-tests".

Describe alternatives you've considered
Don't use Go-Migrator and use a big sql statement by go execution (which is not maintainable imo)

Additional context
My Integration Tests insert stuff like new users or special data entities to make usage of these tests easier and to not start everything completely from scratch

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

1 participant