Django ORM
Django ORM is supported through PostgreSQL integration. You can use Django's ORM to define your database models and then extract the schema using pg_dump for use with Liam ERD.
Using Django ORM with Liam ERD
- Set up a Django project with PostgreSQL as the database backend:
- Define your models using Django's ORM:
- Apply migrations to create the database schema:
- Extract the schema using pg_dump:
- Use Liam CLI to build an ER diagram:
Sample Implementation
You can find a sample implementation of Django ORM with Liam ERD on GitHub:
- GitHub Actions: .github/workflows/django-with-postgres.yml
- Django project: samples/django-with-postgres
The sample project demonstrates how to:
- Set up a Django project with PostgreSQL
- Define models using Django's ORM
- Extract the schema using pg_dump
- Use the extracted schema with Liam ERD
Under the Hood
Django ORM generates SQL for PostgreSQL, which is then parsed by Liam ERD using the PostgreSQL parser. For more details about PostgreSQL support, see the PostgreSQL documentation.