|
@@ -181,4 +181,18 @@ class MSSQLHandler:
|
|
|
self._log.error("Could not drop the table, Error {}".format(error))
|
|
|
|
|
|
else:
|
|
|
- self._log.info("The table can't be dropped because it does not exist")
|
|
|
+ self._log.info("The table can't be dropped because it does not exist")
|
|
|
+
|
|
|
+ def draw_er_diagram_from_db(self, diagram_path: str,
|
|
|
+ schema: str = None,
|
|
|
+ include_tables: list = None):
|
|
|
+
|
|
|
+ diagram_dir = os.path.dirname(diagram_path)
|
|
|
+ if diagram_dir != "":
|
|
|
+ os.makedirs(diagram_dir, exist_ok=True)
|
|
|
+
|
|
|
+ import eralchemy
|
|
|
+ eralchemy.render_er(self._db_uri,
|
|
|
+ diagram_path,
|
|
|
+ schema=schema,
|
|
|
+ include_tables=include_tables)
|