zero-codegen
v0.0.2
Published
Zero Codegen is a tool that generates table and relationship definitions for [Zero](https://zero.rocicorp.dev/) based on your existing Postgres database.
Readme
Zero Codegen
Zero Codegen is a tool that generates table and relationship definitions for Zero based on your existing Postgres database.
DISCLAIMER: Zero Codegen is under heavy development and may not function as expected. I'm currently updating this project when I encounter issues in my own work.
How to use
- Find your Postgres database connection string.
- Run
zero-codegen --database-url <connection-string> - Optionally, you can specify the file path to the tables and relationships files with
--tables-pathand--relationships-pathparameters.
TODO
- Find a better way to name relationships when a table has multiple foreign keys referencing the same table.
- Only import tables and zero data types that are actually used in the generated code.
- Support JSON and JSONB data types.
- Support enums.
