迁移库报错

python: 3.11.3 mysql: 8.0.20 Django: 5.2.1

django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table ((1046, 'No database selected'))

评论 1

  • 配置文件里,没有指定哪个数据库吧? 还有迁移你有没有指定迁移哪个app?