You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Change the CLI flag to --add-soft-delete;
2. Change the flag in delete methods to hardDelete;
3. Add test suites for soft deletes when it's enabled;
4. Add tests for table.CanSoftDelete;
5. Change randomize.Struct to ignore the deleted_at column;
6. Fix the soft delete in slice.DeleteAll.
Copy file name to clipboardExpand all lines: main.go
+2-2
Original file line number
Diff line number
Diff line change
@@ -104,7 +104,7 @@ func main() {
104
104
rootCmd.PersistentFlags().BoolP("no-driver-templates", "", false, "Disable parsing of templates defined by the database driver")
105
105
rootCmd.PersistentFlags().BoolP("add-global-variants", "", false, "Enable generation for global variants")
106
106
rootCmd.PersistentFlags().BoolP("add-panic-variants", "", false, "Enable generation for panic variants")
107
-
rootCmd.PersistentFlags().BoolP("soft-deletes", "", false, "Enable soft deletion by updating deleted_at timestamp")
107
+
rootCmd.PersistentFlags().BoolP("add-soft-deletes", "", false, "Enable soft deletion by updating deleted_at timestamp")
108
108
rootCmd.PersistentFlags().BoolP("version", "", false, "Print the version")
109
109
rootCmd.PersistentFlags().BoolP("wipe", "", false, "Delete the output folder (rm -rf) before generation to ensure sanity")
110
110
rootCmd.PersistentFlags().StringP("struct-tag-casing", "", "snake", "Decides the casing for go structure tag names. camel, title or snake (default snake)")
0 commit comments