真正的django迁移

问题描述 投票:1回答:1

运行makemigrations然后进行迁移时,我得到以下输出:

(roundwellenv) ruben@ruben-H81M-D2V:~/roundwell$ ./dev_migrations.sh 
No changes detected in apps 'contenttypes', 'parents', 'admin', 'tips', 'tutors', 'login', 'auth', 'quiz', 'sessions'
Operations to perform:
  Apply all migrations: admin, auth, contenttypes, login, parents, quiz, sessions, tips, tutors
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0001_initial... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying auth.0010_alter_group_name_max_length... OK
  Applying auth.0011_update_proxy_permissions... OK
  Applying login.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying admin.0003_logentry_add_action_flag_choices... OK
  Applying parents.0001_initial... OK
  Applying quiz.0001_initial... OK
  Applying sessions.0001_initial... OK
  Applying tips.0001_initial... OK
  Applying tutors.0001_initial... OK
(roundwellenv) ruben@ruben-H81M-D2V:~/roundwell$ python manage.py createsuperuser

You have 21 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, login, parents, quiz, sessions, tips, tutors.
Run 'python manage.py migrate' to apply them.

我知道确实有问题,因为即使我从迁移文件夹和干净的sqlite3数据库中删除了pycache内容和内容,它实际上也找不到需要应用的任何迁移,除非我指定要为其创建迁移的应用程序。关于什么可能导致这种情况的任何线索?我怀疑这可能是我的自定义登录应用程序,但是一旦迁移完成(就像它们在此处实际运行站点的系统上一样),数据库就可以正常工作。

python django django-migrations
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.