aerich/migrate.py
def write_old_models(cls, config: dict, app: str, location: str):
        """
        write new models to old models
        :param config:
        :param app:
        :param location:
        :return:
        """
        cls.app = app

        old_model_files = []
        models = config.get("apps").get(app).get("models")
        for model in models:
            old_model_files.append(import_module(model).__file__)

        cls.cp_models(app, old_model_files, os.path.join(location, app, cls.get_old_model_file()))

        write new models to old models
        :param config:
        :param app:
        :param location:
        :return:
        
write new models to old models
write new models to old models
def write_old_models(cls, config: dict, app: str, location: str):
        cls.app = app
        old_model_files = []
        models = config.get("apps").get(app).get("models")
        for model in models:
            old_model_files.append(import_module(model).__file__)
        cls.cp_models(app, old_model_files, os.path.join(location, app, cls.get_old_model_file()))
def write_old_models ( cls , config : dict , app : str , location : str ) : cls . app = app old_model_files = [ ] models = config . get ( "apps" ) . get ( app ) . get ( "models" ) for model in models : old_model_files . append ( import_module ( model ) . __file__ ) cls . cp_models ( app , old_model_files , os . path . join ( location , app , cls . get_old_model_file ( ) ) )
write new models to old models
write new models to old models
"""
        write new models to old models
        :param config:
        :param app:
        :param location:
        :return:
        """
None
cls
config
dict
None
app
str
None
location
str
None