Back to Browse

Move or Migrate SQLite Data to PostgreSQL | MySQL | MariaDB Database in Django 3 #django

10.0K views
Mar 15, 2021
7:13

๐Ÿ‘‹๐Ÿฝ 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 https://www.youtube.com/watch?v=3HPq12w-dww 02:36 Connect your New Database to your project ๐Ÿ”— Django documentation๐Ÿ“š for database setup https://docs.djangoproject.com/en/3.1/ref/databases/ 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/3034910/whats-the-best-way-to-migrate-a-django-db-from-sqlite-to-mysql ๐Ÿ™๐Ÿฝ 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: https://www.linkedin.com/in/peng-boris-akebuon-0b8ba0195 ๐Ÿ”— Twitter: https://twitter.com/itz_omen Errors! Join Our Discord for Help ๐Ÿ”— https://discord.gg/UKaQs2WmvT Background Music produced by H3 Music https://www.youtube.com/channel/UC1nH4RqASg6DK2WgfPjyh5Q

Download

0 formats

No download links available.

Move or Migrate SQLite Data to PostgreSQL | MySQL | MariaDB Database in Django 3 #django | NatokHD