rel8
rel8 copied to clipboard
WIP: Add schema-to-rel8
This executable takes a database connection string and a schema name, and prints out Haskell code to STDOUT that defines all data types along with corresponding TableSchemas.
For example:
cabal run schema-to-rel8 -- --connection="dbname=foo user=bar" --schema="public"
Hi, drive by contribution here, because I was messing with rel8 and ended up using your script.
- Bugfix: the script was using the table name in place of the schema name.
- Suggested, but questionable, improvement: deduplicate the definition of the field name. I'm not attached to this commit at all.
#210
FYI I think this script is findable and useful even if just sits here in this PR forever.
Thanks,