Closed ricardo-snyk closed 2 years ago
Hi @ricardo-snyk, good catch!
Yes you are right, the default
branch assumes it's a nullable-column. I played around with it a bit and would like to make (nullable) strings the default/fallback for unknown column types. If you don't mind I would like to take over from here and open a new PR with these modification and some slightly refactorings. Hope I can tackle it this weekend!
@ricardo-snyk I opened https://github.com/fraenky8/tables-to-go/pull/47 - please check if it works for you. Tested on my side with MySQL and PG and works fine! 👍
🥇 Works as expected!! 🚀
Hey!
In postgres if I have a column as:
where
severity
is a typeCREATE TYPE severity AS ENUM ('low', 'medium', 'high', 'critical');
tables-to-go
will generate:RuleSeverity *string
I was expecting
RuleSeverity string
since we have anot null
column.I will see if I can have a PR for this (if this is simple!).