Skip to content

Better implementation for mongodb.SetVersion #779

@SinghCoder

Description

@SinghCoder

Is your feature request related to a problem? Please describe.
Do we really need to drop the migrations collection everytime we want to set the version here, can't we just run an update call? This requires giving drop permissions to service which wants to run such migrations which I think is an unnecessary thing to do.

Describe the solution you'd like
We can just run an update operation instead I propose.

migrationsCollection.UpdateOne(context.TODO(), bson.D{}, bson.M{"version": version, "dirty": dirty}

Describe alternatives you've considered

_

Additional context

_

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