compare

package
v1.8.81 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareSchemas

func CompareSchemas(
	config *lib.Config,
	localSchemaList *schema.SchemaList,
	remoteSchemas map[string]*schema.Schema,
) []*schema.SchemaComparison

CompareSchema returns a string that contains a new line (`\n`) separated list of sql statements This comparison assumes the local `schemaFile` is the authority and the remote database is the schema to be updated @param reverse bool If true, the remote and local schema comparison is flipped in that the remote schema is treated as the authority

and the local schema is treated as the schema to be updated.

@command compare [reverse]

func PrintComparisonSummary

func PrintComparisonSummary(comparisons []*schema.SchemaComparison)

func PrintComparisons

func PrintComparisons(comparisons []*schema.SchemaComparison)

Types

type Compare

type Compare struct {
	LocalSQLPaths      []string                  // LocalSQLPaths is a list of paths pulled from the changesets.json file
	ChangesetSignature string                    // ChangesetSignature is a SHA signature for the changesets.json file
	LocalChangeFiles   []lib.ChangeFile          // LocalChangeFiles is a list of paths to local change files
	Files              *lib.Files                // Files is the injected file manager
	Databases          map[string]*schema.Schema // A map of databases
	// contains filtered or unexported fields
}

func NewCompare

func NewCompare(config *lib.ConfigDatabase, connector connectors.IConnector) (compare *Compare, e error)

NewCompare creates a new Compare instance

Jump to

Keyboard shortcuts

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