Ошибка миграции на юг: нет миграции
Я новичок на юге, и я пытаюсь выполнить миграцию. В локальной системе все работало нормально, но когда я отправил код в Heroku и попытался перенести, я получил эту ошибку:
Traceback (most recent call last):
File "manage.py", line 57, in <module>
execute_from_command_line()
File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
utility.execute()
File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(*args, **options.__dict__)
File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
output = self.handle(*args, **options)
File "/app/.heroku/python/lib/python2.7/site-packages/south/management/commands/migrate.py", line 111, in handle
ignore_ghosts = ignore_ghosts,
File "/app/.heroku/python/lib/python2.7/site-packages/south/migration/__init__.py", line 200, in migrate_app
applied_all = check_migration_histories(applied_all, delete_ghosts, ignore_ghosts)
File "/app/.heroku/python/lib/python2.7/site-packages/south/migration/__init__.py", line 81, in check_migration_histories
m = h.get_migration()
File "/app/.heroku/python/lib/python2.7/site-packages/south/models.py", line 34, in get_migration
return self.get_migrations().migration(self.migration)
File "/app/.heroku/python/lib/python2.7/site-packages/south/models.py", line 31, in get_migrations
return Migrations(self.app_name)
File "/app/.heroku/python/lib/python2.7/site-packages/south/migration/base.py", line 64, in __call__
self.instances[app_label] = super(MigrationsMetaclass, self).__call__(app_label_to_app_module(app_label), **kwds)
File "/app/.heroku/python/lib/python2.7/site-packages/south/migration/base.py", line 90, in __init__
self.set_application(application, force_creation, verbose_creation)
File "/app/.heroku/python/lib/python2.7/site-packages/south/migration/base.py", line 162, in set_application
raise exceptions.NoMigrations(application)
south.exceptions.NoMigrations: Application '<module 'django_extensions' from '/app/.heroku/python/lib/python2.7/site-packages/django_extensions/__init__.pyc'>' has no migrations.
В местном я сделал:
python manage.py schemamigration spicemodels --auto
python manage.py migrate spicemodels
Затем я перенес файлы миграции в Heroku и получил доступ к приложению, используя:
heroku run bash --app <app-name>
Затем я вошел в правильный каталог и запустил:
python manage.py migrate spicemodels
Вот когда я получил ошибку выше.