dialect/sql/schema: allow planning with indentation (#3363)

This commit is contained in:
Ariel Mashraki
2023-03-04 10:06:53 +02:00
committed by GitHub
parent 9517200cb6
commit f16451eab8
7 changed files with 29 additions and 12 deletions

View File

@@ -41,6 +41,14 @@ func WithGlobalUniqueID(b bool) MigrateOption {
}
}
// WithIndent sets Atlas to generate SQL statements with indentation.
// An empty string indicates no indentation.
func WithIndent(indent string) MigrateOption {
return func(a *Atlas) {
a.indent = indent
}
}
// WithErrNoPlan sets Atlas to returns a migrate.ErrNoPlan in case
// the migration plan is empty. Defaults to false.
func WithErrNoPlan(b bool) MigrateOption {