tbls
tbls is a CI-friendly tool for documenting a database schema. If you're using tbls, in most cases you can automatically generate a useful ER diagram with Liam ERD. This page provides instructions and tips for generating an ER diagram in a tbls project.
Using tbls JSON Output
First, generate a JSON schema file using tbls:
Then use Liam CLI to build an ER diagram from the JSON file:
If the command runs successfully, an ER diagram will be generated in the dist
directory.
Integration with CI/CD
You can integrate tbls and Liam ERD in your CI/CD pipeline to automatically generate and deploy ER diagrams. Here's an example GitHub Actions workflow:
For more information about CI/CD integration, see CI/CD Integration.
Under the Hood
Liam ERD utilizes tbls's JSON schema output format (schema definition) to convert database structures into Liam's internal format.