fix: address audit execution failures and unsafe type conversions
This commit is contained in:
@@ -285,6 +285,7 @@ type Options struct {
|
||||
Types string `yaml:"types"`
|
||||
ArrayNullable string `yaml:"array_nullable"`
|
||||
ContinueOnError bool `yaml:"continue_on_error"`
|
||||
AtomicExecution bool `yaml:"atomic_execution"`
|
||||
// FullDDL makes direct pgsql output execute the full idempotent DDL instead of
|
||||
// diffing against the live database first.
|
||||
FullDDL bool `yaml:"full_ddl"`
|
||||
@@ -479,6 +480,14 @@ func (s *Set) Validate() error {
|
||||
|
||||
func (j *Job) validate() []string {
|
||||
var e []string
|
||||
if j.Options.AtomicExecution {
|
||||
if j.Options.ContinueOnError {
|
||||
e = append(e, "atomic_execution cannot be combined with continue_on_error")
|
||||
}
|
||||
if (j.Command != CommandConvert && j.Command != CommandMerge) || j.Output == nil || j.Output.ConnEnv == "" || j.Output.Format != "pgsql" {
|
||||
e = append(e, "atomic_execution requires convert/merge with pgsql database output")
|
||||
}
|
||||
}
|
||||
|
||||
switch j.Command {
|
||||
case CommandConvert, CommandMerge, CommandScriptsList, CommandScriptsExec,
|
||||
|
||||
Reference in New Issue
Block a user