tortoise / aerich

A database migrations tool for TortoiseORM, ready to production.
https://github.com/tortoise/aerich
Apache License 2.0
820 stars 94 forks source link

Many apps migrate Appears 'no changes detected' #152

Closed OpenHill closed 3 years ago

OpenHill commented 3 years ago

Hi

I have encountered a problem when I use Aerich. When I have multiple apps, Aerich will not generate the corresponding App folder in the Migrations folder when initialization, always generate an Aerich folder.

setting ↓

TORTOISE_ORM = {
"connections": {"default": "mysql://admin:admin@localhost:3306/test"},
"apps": {
'aerich': {
'models': ['aerich.models'],
'default_connection': 'default'
},
'device_manager': {
'models': ['apps.device_manager.models'],
'default_connection': 'default'
},
'auth': {
'models': ['common.auth.models'],
'default_connection': 'default'
},
'accessory': {
'models': ['common.accessory.models'],
'default_connection': 'default'
}
}
}

Is there any way to make it successfully migrate?

# File Directory

project_directory
    apps
        device_manager
            models.py
        __init__.py # TORTOISE_ORM in

    common
        accessory
            models.py
        auth
            models.py

device_manager app, auth app, accessory app always shows 'no changes detected'

the-akpan commented 1 year ago

Were you able to resolve this?