feat(pgsql): diff against the live database by default for direct output
Direct pgsql output (job output.conn_env, merge --output-conn) now reads the live schema and executes only the differences. full_ddl: true (job option) or --full-ddl (merge) restores the full idempotent DDL; file output is unchanged. - compare PKs by columns, skip constraint-backed indexes, normalize index method, FK actions, serial/numeric types, default literals/casts and truncated names - diff table and column comments instead of re-emitting them - remove leftover ZZDUMP debug code
This commit is contained in:
@@ -2191,9 +2191,6 @@ func (w *Writer) diffStatements(model, current *models.Database) ([]string, erro
|
||||
}
|
||||
statements = append(statements, setvalStatements...)
|
||||
|
||||
if dump := os.Getenv("ZZDUMP"); dump != "" {
|
||||
_ = os.WriteFile(dump, []byte(strings.Join(statements, "\n=====\n")), 0o644)
|
||||
}
|
||||
return statements, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user