fix: preserve MySQL schema fidelity

This commit is contained in:
2026-10-12 21:56:48 +02:00
parent dd97413b8e
commit 05466a92b1
26 changed files with 1869 additions and 169 deletions
+2
View File
@@ -18,6 +18,7 @@ var (
noVersion bool
silent bool
strictDirectives bool
strictConversion bool
lowercaseIdentifiers bool
typeMapFlags []string
typeMappings map[string]string
@@ -62,6 +63,7 @@ func init() {
rootCmd.PersistentFlags().StringArrayVar(&typeMapFlags, "type-map", nil, "Override a SQL-to-Go type mapping for bun/gorm output as sqltype=gotype (repeatable), e.g. --type-map uuid=uuid.UUID --type-map numeric=decimal.Decimal")
rootCmd.PersistentFlags().BoolVar(&noVersion, "no-version", false, "Suppress the RelSpec version header")
rootCmd.PersistentFlags().BoolVar(&silent, "silent", false, "Suppress progress and status messages (errors are still shown)")
rootCmd.PersistentFlags().BoolVar(&strictConversion, "strict-conversion", false, "Reject known lossy MySQL schema conversions before writing or executing output")
rootCmd.PersistentFlags().BoolVar(&strictDirectives, "strict-directives", false, "Fail on unknown or untranslatable DBML dialect directives (@postgres:, @sqlite:, …)")
}