👋🏽 Hi there, I'm going to show you how to move or migrate SQLite Data to PostgreSQL or MySQL, or MariaDB Databases in Django
This is a time-saving tip that will help you to easily switch databases or prepare your Django project for deployment.
This helps me a lot, as I use real data in my SQLite during development and when switching to a production-ready database, I can quickly move the content of the old database into my new database
00:00 Start
00:06 Introduction
00:29 Set Up your project or use the project I used
🔗 Project Link
https://github.com/itzomen/salebay
01:30 Save Database content to a JSON file
02:00 Set Up Aand Create New Database
🔗 Set Up PostgreSQL and PgAdmin
• Postgres Database + AWS RDS | Django (3.0...
02:36 Connect your New Database to your project
🔗 Django documentation📚 for database setup
https://docs.djangoproject.com/en/3.1...
04:02 Apply Migrations to create tables in the new database
05:01 Exclude ContentType Data
Exclude Contentype data
python manage.py shell
from django.contrib.contenttypes.models import ContentType
ContentType.objects.all().delete()
quit()
06:20 Load data from JSON file into your new database
🔗 Move data
python manage.py loaddata datadump.json
📃 Source: https://stackoverflow.com/questions/3...
🙏🏽 Thanks for watching🤸🏼♂️
🙏🏽 LIKE, SUBSCRIBE, AND SHARE
If you have any questions, do not hesitate to comment or send us a mail. We will reply as soon as possible.
Thanks
Let's Connect
🔗 GitHub: https://github.com/itzomen
🔗 LinkedIn: / peng-boris-akebuon-0b8ba0195
🔗 Twitter: / itz_omen
Errors! Join Our Discord for Help
🔗 / discord
Background Music produced by H3 Music
/ @h3music