Django MongoDB 迁移警告

3
  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数据库连接。 为什么在迁移时会收到这些警告?


这个链接是否有助于解决你的问题? - Charnel
1个回答

1

MongoDB并非Django项目本身支持的数据库,只能通过Djongo适配器使用。

这些模型/迁移使用了某些Django核心功能,而Djongo目前不支持这些功能,这从错误消息中很明显。


实际上,这些消息来自于 Djongo 适配器,而不是 Django - Charnel
@Charnel Er,是的? - AKX
MongoDB并不是Django项目本身支持的,只能通过Djongo适配器来使用。我的意思是这个人已经在使用Djongo适配器了,而不是Django,可能是因为安装了错误的库版本。 - Charnel
我认为这些错误是由于Djongo不支持一些Django迁移所需的功能引起的。 - AKX

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接