Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compare ¶
type Compare struct { Config *lib.Config // Config is the config object 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 Connector lib.IConnector // IConnector is the injected server manager Databases map[string]*lib.Database // A map of databases Options lib.Options }
func NewCompare ¶
NewCompare creates a new Compare instance
func (*Compare) ApplyChangeset ¶
ApplyChangeset runs the sql produced by the `CompareSchema` command against the target database @command compare [reverse] apply
func (*Compare) CompareSchema ¶
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 (*Compare) ExportSchemaToSQL ¶
ExportSchemaToSQL exports the current schema to sql
func (*Compare) ImportSchema ¶
ImportSchema calles `FetchSchema` and then marshal's it into a JSON object, writing it to the default schema.json file @command import