Ejemplo n.º 1
0
 def migration_export(self, **kwargs):
     for cls_name in kwargs["import_export_types"]:
         path = self.path / "files" / "migrations" / kwargs["name"]
         if not exists(path):
             makedirs(path)
         with open(path / f"{cls_name}.yaml", "w") as migration_file:
             yaml.dump(export(cls_name), migration_file)
Ejemplo n.º 2
0
 def migration_export(self, **kwargs: Union[list, str]) -> None:
     for cls_name in kwargs["import_export_types"]:
         path = self.path / "projects" / "migrations" / kwargs["name"]
         if not exists(path):
             makedirs(path)
         with open(path / f"{cls_name}.yaml", "w") as migration_file:
             dump(export(cls_name), migration_file, default_flow_style=False)