Skip to content

Multiple migrators to migrate one database? #1165

Open
@uvulpos

Description

@uvulpos

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions