How to make schema graph?
meta = MetaData()
meta.reflect(bind=engine, views=True, resolve_fks=False)
graph = create_schema_graph(
metadata=meta,
show_indexes=False,
concentrate=False,
rankdir='LR'
)
graph.write_png('dbschema.png')
imgplot = plt.imshow(mpimg.imread('dbschema.png'))
plt.xticks([])
plt.yticks([])
plt.grid(False)
plt.show()
I get error in create_schema_graph:
AttributeError: 'MetaData' object has no attribute 'bind'
Thats shame, but I already did it, but I can't figure out, that I doing wrong this time.