gen
gen copied to clipboard
check database name when collect schemas
When collecting table schemas, we must check selectel database name to avoid conflicts with multiple cloned databases. For example, you can create database foo, clone it to foo_dev, set the same login/password to both databases and then try to generate structs, after code generation you can see conflicts.
better gen tool: https://github.com/go-gorm/gen