2

In my settings.py file I have the following:

  'ENGINE': 'djongo',
    'NAME': '<db_name>,
    'HOST': 'mongodb://username:<password>@ds147436.mlab.com:47436/<db_name>',
    'USER': 'username',
    'PASSWORD': '<password>',

But when I run 'py manage.py makemigrations' then 'py manage.py migrate', the MongoDB collections get created on my local server MongoDB Compass. I don't know why it isn't creating my database over at Mlab? Where do I have to change my settings, or perhaps run a few different commands? In my terminal I get the following when I run 'py manage.py migrate':

(env) PS D:\Business\Daydoa\v6-Django_with_MongoDB3\djongo_project> python manage.py migrate       
Operations to perform:
  Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
This version of djongo does not support "NULL, NOT NULL column validation check" fully. Visit https://www.patreon.com/nesdis
  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
Simon Suh
  • 10,599
  • 25
  • 86
  • 110
  • What documentation are you following? – D. SM Jul 30 '20 at 04:20
  • I fixed it, kind of, I used 'ENGINE': 'djongo', 'NAME': '', 'CLIENT': { 'host': 'mongodb://:@ds161062.mlab.com:61062/projectname_db', 'username': '', 'password': '', } but Mlab isn't getting populated with all of the default schemas that the MongoDB Compass version is getting, still trying to figure out why. – Simon Suh Jul 30 '20 at 04:35
  • @SimonSuh did you get the solution of this prob ? – Mohd. Shoaib Dec 08 '20 at 11:42

0 Answers0