Heroku のプロジェクトに南を追加しようとしています。次の手順に従いました。
heroku run easy_install South
で追加'south'
_INSTALLED_APPS
settings.py
それで
heroku run ./manage.py syncdb
heroku run ./manage.py convert_to_south sheets
トレースバック
Running `./manage.py convert_to_south sheets` attached to terminal... up, run.2005
Creating migrations directory at '/app/sheets/migrations'...
Creating __init__.py in '/app/sheets/migrations'...
+ Added model sheets.Sheets
+ Added model sheets.UserSheets
+ Added M2M table for users on sheets.UserSheets
+ Added model sheets.SheetScribble
+ Added model sheets.SheetScribbleComment
+ Added model sheets.Tasks
+ Added model sheets.TaskComment
Created 0001_initial.py. You can now apply this migration with: ./manage.py migrate sheets
- Soft matched migration 0001 to 0001_initial.
Running migrations for sheets:
- Nothing to migrate.
- Loading initial data for sheets.
Installed 0 object(s) from 0 fixture(s)
App 'sheets' converted. Note that South assumed the application's models matched the database
(i.e. you haven't changed it since last syncdb); if you have, you should delete the sheets/migrations
directory, revert models.py so it matches the database, and try again.
次に、2番目のアプリを南に変換しようとすると、
heroku run ./manage.py convert_to_south scribbler
このエラーが発生します
Running `./manage.py convert_to_south scribbler` attached to terminal... up, run.6046
Creating migrations directory at '/app/scribbler/migrations'...
Creating __init__.py in '/app/scribbler/migrations'...
+ Added model scribbler.ScribbleMedia
+ Added model scribbler.Scribble
+ Added model scribbler.Tag
+ Added M2M table for scribbles on scribbler.Tag
+ Added model scribbler.SharedScribble
+ Added M2M table for users_favored on scribbler.SharedScribble
+ Added model scribbler.ScribbleComment
+ Added model scribbler.Connections
+ Added unique constraint for ['following', 'followers'] on scribbler.Connections
+ Added model scribbler.UserProfile
+ Added model scribbler.Invitation
+ Added model scribbler.Notifications
Created 0001_initial.py. You can now apply this migration with: ./manage.py migrate scribbler
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
utility.execute()
File "/app/.heroku/venv/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/venv/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(*args, **options.__dict__)
File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
output = self.handle(*args, **options)
File "/app/.heroku/venv/lib/python2.7/site-packages/south/management/commands/convert_to_south.py", line 87, in handle
delete_ghosts=options.get("delete_ghosts", False),
File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 150, in call_command
return klass.execute(*args, **defaults)
File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
output = self.handle(*args, **options)
File "/app/.heroku/venv/lib/python2.7/site-packages/south/management/commands/migrate.py", line 108, in handle
ignore_ghosts = ignore_ghosts,
File "/app/.heroku/venv/lib/python2.7/site-packages/south/migration/__init__.py", line 193, in migrate_app
applied_all = check_migration_histories(applied_all, delete_ghosts, ignore_ghosts)
File "/app/.heroku/venv/lib/python2.7/site-packages/south/migration/__init__.py", line 74, in check_migration_histories
m = h.get_migration()
File "/app/.heroku/venv/lib/python2.7/site-packages/south/models.py", line 34, in get_migration
return self.get_migrations().migration(self.migration)
File "/app/.heroku/venv/lib/python2.7/site-packages/south/models.py", line 31, in get_migrations
return Migrations(self.app_name)
File "/app/.heroku/venv/lib/python2.7/site-packages/south/migration/base.py", line 61, in __call__
self.instances[app_label] = super(MigrationsMetaclass, self).__call__(app_label_to_app_module(app_label), **kwds)
File "/app/.heroku/venv/lib/python2.7/site-packages/south/migration/base.py", line 89, in __init__
self.set_application(application, force_creation, verbose_creation)
File "/app/.heroku/venv/lib/python2.7/site-packages/south/migration/base.py", line 161, in set_application
raise exceptions.NoMigrations(application)
south.exceptions.NoMigrations: Application '<module 'sheets' from '/app/sheets/__init__.py'>' has no migrations.
何が問題なのかわかりません。