Documentation ¶
Overview ¶
Package diff contains functions to generate SQL statements to migrate an old schema to the new schema
Index ¶
- func Files(dst io.Writer, from, to string, options ...Option) error
- func Sources(dst io.Writer, from, to schemalex.SchemaSource, options ...Option) error
- func Statements(dst io.Writer, from, to model.Stmts, options ...Option) error
- func Strings(dst io.Writer, from, to string, options ...Option) error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Files ¶
Files compares contents of two files and generates a series of statements to migrate from the old one to the new one, writing the result to `dst`
func Sources ¶ added in v0.0.7
Files compares contents from two sources and generates a series of statements to migrate from the old one to the new one, writing the result to `dst`
func Statements ¶
Statements compares two model.Stmts and generates a series of statements to migrate from the old one to the new one, writing the result to `dst`
Types ¶
type Option ¶
func WithParser ¶
WithParser specifies the parser instance to use when parsing the statements given to the diffing functions. If unspecified, a default parser will be used
func WithTransaction ¶
WithTransaction specifies if statements to control transactions should be included in the diff.