My Django, SQLlite website is up and running remotely, thanks to all the help here. Now I wanted to migrate my data as well, I have tried several options provided in this forum, however, I have not been able to migrate the data yet
Steps given in the following links have been able to fix my all issues, (none of the other options were able to help me completely)
What's the best way to migrate a Django DB from SQLite to MySQL?
and
Changing Django development Database from the default SQLite to PostgreSQL
However, the remote website is still not showing any data.
=============================================================
HP@HP-PC MINGW64 ~/git_projects/django_local_library (master)
$ python manage.py migrate --run-syncdb
Operations to perform:
Synchronize unmigrated apps: messages
Apply all migrations: admin, auth, catalog, contenttypes, sessions
Synchronizing apps without migrations:
Creating tables...
Running deferred SQL...
Running migrations:
No migrations to apply.
HP@HP-PC MINGW64 ~/git_projects/django_local_library (master)
$ python manage.py shell
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole)
from django.contrib.contenttypes.models import ContentType ContentType.objects.all().delete() (56, {'auth.Group_permissions': 0, 'auth.User_user_permissions': 0, 'auth.Permission': 45, 'contenttypes.ContentType': 11}) quit()
HP@HP-PC MINGW64 ~/git_projects/django_local_library (master)
$ python manage.py loaddata datadump.json
Installed 232 object(s) from 1 fixture(s)
=============================================================
After above steps, (with some, unique constraint issues, due to my multiple loads), it appears to me like everything is fine and I was expecting to see my data, however, it is not yet there.
(Just to add, I am able to see my data locally on psql- so the migration is successful, but locally)
Please help me, if I am missing any steps? Or should I try pushing data to heroku?
385 python manage.py makemigrations
386 python manage.py migrate
387 python manage.py loaddata datadump.json 388 heroku open – mamtach Sep 12 '19 at 08:38