db-schema-gen
v0.8.0
Published
A tool for generating TypeScript types from database schemas
Downloads
15
Readme
Overview
This is a simple example of how to use the DB Schema Gen to generate types from a database schema.
Usage
- Run
npm install db-schema-gen
oryarn add db-schema-gen
- Create a
.json
config file with the following contents:
{
"language": "postgresql",
"outputDir": "types",
"url": "YOUR_CONNECTION_STRING",
"options": {
"namespace": "DB",
"columnCase": "camel"
}
}
- Run
db-schema-gen --config YOUR_CONFIG_FILE.json
- Enjoy your generated types!