import ConfigParser
from sqlalchemy import MetaData
from sqlalchemy_schemadisplay import create_schema_graph
config = ConfigParser.RawConfigParser()
config.read('/etc/nova/nova.conf')
connection = config.get("DEFAULT", "sql_connection")
graph = create_schema_graph(metadata=MetaData(connection),
show_datatypes=False,show the datatypes
show_indexes=False,
rankdir='LR',
concentrate=False)
graph.write_png('dbschema.png')
from sqlalchemy import MetaData
from sqlalchemy_schemadisplay import create_schema_graph
config = ConfigParser.RawConfigParser()
config.read('/etc/nova/nova.conf')
connection = config.get("DEFAULT", "sql_connection")
graph = create_schema_graph(metadata=MetaData(connection),
show_datatypes=False,show the datatypes
show_indexes=False,
rankdir='LR',
concentrate=False)
graph.write_png('dbschema.png')