migration

package
v0.1.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Copyright (c) 2023 the go-mongr8 Authors and Contributors [@see Authors file]

Licensed under the MIT License (https://opensource.org/licenses/MIT)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd interface {
	ApplyMigration(migrations []migrator.Migration) error
	ConsolidateMigration(collections []collection.Collection, migrations []migrator.Migration) error
	GenerateMigration(collections []collection.Collection, migrations []migrator.Migration) error
}

func NewMigration

func NewMigration(ctx *context.Context, db *mongo.Database) Cmd

type Migration

type Migration struct {
	Cmd
	// contains filtered or unexported fields
}

func (*Migration) ApplyMigration

func (m *Migration) ApplyMigration(migrations []migrator.Migration) error

func (*Migration) ConsolidateMigration

func (m *Migration) ConsolidateMigration(collections []collection.Collection, migrations []migrator.Migration) error

func (*Migration) GenerateMigration

func (m *Migration) GenerateMigration(collections []collection.Collection, migrations []migrator.Migration) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL