Schema Input
DBSprout supports 7 schema input methods. All produce the same unified DatabaseSchema model internally.
Live Database Introspection
Section titled “Live Database Introspection”Connect directly to a running database:
# PostgreSQLdbsprout init --db postgresql://user:pass@host:5432/dbname
# MySQLdbsprout init --db mysql://user:pass@host:3306/dbname
# SQLitedbsprout init --db sqlite:///path/to/database.db
# MSSQLdbsprout init --db mssql://user:pass@host:1433/dbnameDBSprout uses SQLAlchemy’s Inspector to read tables, columns, primary keys, foreign keys, indexes, and constraints.
SQL DDL Files
Section titled “SQL DDL Files”Parse CREATE TABLE statements from a .sql file:
dbsprout init --file schema.sqlSupports PostgreSQL, MySQL, and SQLite DDL dialects.
Parse DBML schema files:
dbsprout init --file schema.dbmlPrisma Schema
Section titled “Prisma Schema”Parse Prisma schema files:
dbsprout init --file prisma/schema.prismaMermaid ER Diagrams
Section titled “Mermaid ER Diagrams”Parse Mermaid entity-relationship diagrams:
dbsprout init --file schema.mmdPlantUML
Section titled “PlantUML”Parse PlantUML entity diagrams:
dbsprout init --file schema.pumlDjango Models (Planned)
Section titled “Django Models (Planned)”Parse Django model definitions:
dbsprout init --file models.py --parser django