【问题标题】:Django MongoDB Migration WarningsDjango MongoDB 迁移警告
【发布时间】:2020-11-11 21:29:43
【问题描述】:
  Applying contenttypes.0001_initial...This version of djongo does not support "schema validation using CONSTRAINT" fully. Visit https://www.patreon.com/nesdis
 OK
  Applying auth.0001_initial...This version of djongo does not support "schema validation using KEY" fully. Visit https://www.patreon.com/nesdis
This version of djongo does not support "schema validation using REFERENCES" fully. Visit https://www.patreon.com/nesdis
 OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying admin.0003_logentry_add_action_flag_choices... OK
  Applying contenttypes.0002_remove_content_type_name...This version of djongo does not support "COLUMN DROP NOT NULL " fully. Visit https://www.patreon.com/nesdis
This version of djongo does not support "DROP CASCADE" fully. Visit https://www.patreon.com/nesdis
 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 sessions.0001_initial... OK

我正在尝试将 Django 与 MongoDB 数据库连接。 为什么我在迁移时会收到这些警告?

【问题讨论】:

  • this 对您的问题有帮助吗?

标签: python django mongodb database-migration djongo


【解决方案1】:

Django 项目本身不支持 MongoDB,只能通过 Djongo 适配器支持。

这些模型/迁移使用 Djongo 目前不支持的某些 Django 核心功能,从错误消息中可以明显看出。

【讨论】:

  • 其实这条消息来自Djongo适配器,而不是Django
  • @Charnel 呃,是吗?
  • MongoDB isn't supported by the Django project itself, only via the Djongo adapter - 我的意思是这个人已经在使用Djongo 采用者并且他们不是由Django 而是Djongo 提出的,可能是因为安装了错误的lib 版本。
  • 我认为错误是由于 Djongo 不支持 Django 迁移所需的某些功能造成的。
猜你喜欢
  • 1970-01-01
  • 2022-01-12
  • 2019-08-12
  • 1970-01-01
  • 2020-10-27
  • 2020-01-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多