I appreciate you man, 🎉 Changing form sqlite to postgersql was super confusing for me, but you did it like it's nothing ! and after finishing the video I find out that you right, It wasn't that Hard😂
@justicepeltier90014 жыл бұрын
Thank you so much for creating this video, it was extremely straightforward. As @Ali Hushman already pointed out there was the screen issue at 6:36 but altogether fantastic tutorial.
@veryacademy4 жыл бұрын
You're very welcome
@sherlockstark17063 жыл бұрын
Great Tutorial. Straight to the point, with proper instructions and visual input. :) Thanks for uploading
@sunilshrestha95763 жыл бұрын
Thank you so much for making tutorial on this.There's no such tutorial like this on othet channe.Lots of love and support from me!
@veryacademy3 жыл бұрын
👍
@titan87883 жыл бұрын
Thanks for this video. I deployed my Django app to Heroku with the sqlite3 database and my data started disappearing every hour or so. It was driving me crazy but finally I found the problem is with the database itself
@CosmicNomadis223 жыл бұрын
Same!
@danielnjama14704 жыл бұрын
wanted to dump my data from sqlite from cpanel server and couldn't figure it out. This tutorial has solved all my worries. Thanks so much
@veryacademy4 жыл бұрын
Glad it helped! Thank you!
@javadamanian18063 жыл бұрын
thank you for all vids. may be record some about ci cd such as travis or jenkins. thank you again
@deadandgone704 жыл бұрын
Cheers for the video but any idea why my loaddata didn't work? The error I get is Unique violation: duplicate key value violate unique contraint
@veryacademy4 жыл бұрын
Ah yes, that's what I feel like, Dead and gone. This tutorial should come with a warning. Ok so this error I would be 99.999% sure it is sure to primary key sequences in the tables. Have a look at this tutorials description - there is some better methods of making data dumps from Django - I would think knowing about --natural-foreign --natural-primary would solve it here. manage.py dumpdata --natural-foreign --natural-primary -e contenttypes -e auth.Permission --indent 4 kzbin.info/www/bejne/eZ66mZyCmNGDfq8
@deadandgone704 жыл бұрын
@@veryacademy haha I got it from the song back in 2012 🤣 I’ll have a look into that tomorrow, cheers!
@deadandgone704 жыл бұрын
@@veryacademy awesome video! That looks like it’ll help my problem 😁
@tlotlegomogapi21744 жыл бұрын
Thank you. Great tutorial. What files can I now delete? Can I delete the sqlite3 file?
@veryacademy4 жыл бұрын
Yes you can now delete that file, but remember to back up! No idea, you might be working on a production DB! 😂
@СтаниславСучков-щ8о4 жыл бұрын
Hey! Really useful video, but while importing data to new DB, an error occured in my case. The point is after I use "python manage.py migrate --run-syncdb" it creates all the tables and they are empty. Later the command "python manage.py loaddata datadump.json" gives an error "psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "django_content_type_app_label_model_76bd3d3b_uniq" DETAIL: Key (app_label, model)=(users, users) already exists."...
@veryacademy4 жыл бұрын
manage.py dumpdata --natural-foreign --natural-primary -e contenttypes -e auth.Permission --indent 4 You need to look into --natural-foreign --natural-primary kzbin.info/www/bejne/eZ66mZyCmNGDfq8
@dinkarjain74894 жыл бұрын
Thanks man nice tutorial. The information is solid. Much appreciated. Although, I encountered an error while loading the dumpdata. The error was: Could not load contenttypes.ContentType(pk=2): duplicate key value violates unique constraint "django_content_type_app_label_model_76bd3d3b_uniq" DETAIL: Key (app_label, model)=(admin, logentry) already exists. So I did a quick search and found this command to make the initial dump which solves this error. ==> python manage.py dumpdata --exclude auth.permission --exclude contenttypes > datadump.json and then redid all the steps, worked fine for me then. Also the hidden line seems to be 'ENGINE': 'django.db.backends.postgresql_psycopg2'
@veryacademy4 жыл бұрын
Thank you Dinkar - this is really going to be useful for others in the same situation. This tutorial falls a bit short really when you consider the amount of issues and considerations when migrating data. I will collect all of this great info and eventually produce a much more in-depth tutorial 👍
@saikatmukherjee80954 жыл бұрын
i was faceing the same ...and finaaly got a video on a new channel lol kzbin.info/www/bejne/iHPXdqVpib2Brck
@novartisnk96843 жыл бұрын
thank you so much for hidden line
@alihusham15604 жыл бұрын
6:36 man their are people watching your screen we need to see it as well, is the engine' : 'django.db.backends.postgresql_psycopg2.extensions
@veryacademy4 жыл бұрын
Yes Ali, sorry - great comment, I will make a GitHut repo - that was useless not actually showing the whole code. Did you manage to achieve what you set out to do?
@alihusham15604 жыл бұрын
@@veryacademy well, no because the pgadmin get frozen and I got too many errors.... I will try tomorrow
@ivanlegranbizarro81023 жыл бұрын
Thank you, the video was a great help to me
@veryacademy3 жыл бұрын
You're welcome!
@liorbm13 жыл бұрын
before we migrate, we don't populate the sqlite DB ?
@veryacademy3 жыл бұрын
Not normally - you need a database structure to put data into
@liorbm13 жыл бұрын
@@veryacademy thanks ! great content !
@jlumley Жыл бұрын
Sorry can you help me I've been through this 6 times and can't get any tables to appear in postgresql althrough it says it has been successful. it does import all the permission tables but no others. Please tell me what i"m not doing it is getting desperate.
@veryacademy Жыл бұрын
Sorry, Joshua, I can't help you will this problem. Not knowing any details, start small. Go through the process with test data first.
@cajocz5 ай бұрын
it's funny how you say 'Google' when you're actually on Bing. Great tutorial btw.
@deepthipisupati35764 жыл бұрын
Hi, i want to push data into tables I've created in pgadmin instead of django creating new tables. How do I do this
@veryacademy4 жыл бұрын
Hi Deepthi, would this get you any closer kzbin.info/www/bejne/eZ66mZyCmNGDfq8
@brandm51763 жыл бұрын
Thanks a lot dude. Even for ubuntu similar.
@veryacademy3 жыл бұрын
You're welcome!
@saikatmukherjee80954 жыл бұрын
In my case... When j use loaddata... It's showing that UnicodeDecoderError : 'utf-8' code can't decode byte 0xff in position 0 : invalid start byte
Sir this was not for django actually.. I'm trying this stackoverflow.com/questions/53643254/unicodedecodeerror-utf-8-codec-cant-decode-byte-0xff-in-position-0
@saikatmukherjee80954 жыл бұрын
But also not working
@ujjwalsrivastava99244 жыл бұрын
I am also facing same problem , any solution yet?
@saikatmukherjee80954 жыл бұрын
@@ujjwalsrivastava9924 ya... I have one.. Wait kzbin.info/www/bejne/iHPXdqVpib2Brck...chek this
@baburamchaudhary1593 жыл бұрын
Thanks Sir, It helped me.
@amiaynarayan5163 жыл бұрын
shows Installed 156 objects from 1 fixture. but the there is no data when I query using (select * from table_name ). Any help is valuabe.
@veryacademy3 жыл бұрын
Hi Amiay, it is difficult to help you here without knowing everything that you are doing.
@amiaynarayan5163 жыл бұрын
I made it work, pgloader makes things easier
@deepchess86414 жыл бұрын
Thank you very much! Its very helpful video. I did it!
@veryacademy4 жыл бұрын
Great to hear it! Thank you!
@nickng80693 жыл бұрын
thanks for the video, helpful
@veryacademy3 жыл бұрын
Glad it helped! Bit of an old one now.
@patrickknows22963 жыл бұрын
Mate you are awesome
@veryacademy3 жыл бұрын
🐱🏍 if you watched this and understand - by your logic - you are awesome too!
@mannycestoni44793 жыл бұрын
After I type in the command "python3 manage.oy loaddata datadump.json" I get this error 'Could not load contenttypes.ContentType(pk=12): UNIQUE constraint failed: django_content_type.app_label, django_content_type.model'
@veryacademy3 жыл бұрын
Did you solve it?
@arifulkader46914 жыл бұрын
i tried just like you but load data don't work anything.No error just not working .
@veryacademy4 жыл бұрын
Sorry to hear you are having issues. Strange one, hard to help if there is no error. I suppose I can only suggest what you probably already have done, check code syntax, make sure you are selecting the right database and data file.
@larrymountain19144 жыл бұрын
Hi there, I got this error when I tried to run the dump - (Unable to serialize database: fe_sendauth: no password supplied). However, please note that I just created my project (no app yet), ran 'python manage.py migrate' and I have not yet created the superuser yet. Is this the problem?
@veryacademy4 жыл бұрын
In your settings make sure you have defined the password parameter correctly - for example you must use capitals.
@larrymountain19144 жыл бұрын
@@veryacademy Thanks - now resolved and my unfinished, but gradually progressing Django-React project, which I learned to do from your tutorials, is successfully on my postgres DB. Keep up the exceptionally great work you are doing, I am very grateful.
@ricardocambundo25273 жыл бұрын
Thanks a lot for the video.
@ujjwalsrivastava99244 жыл бұрын
Hey I am getting error like , unicodedecodeerror after "loaddata datadump.json" command
@veryacademy4 жыл бұрын
Hi Ujjwal - have a look at this see if this is useful kzbin.info/www/bejne/eZ66mZyCmNGDfq8 You may have a -natural-foreign --natural-primary issue 👍
@ujjwalsrivastava99244 жыл бұрын
Huge, respect for you 🙏, if was on ur postion, than I must delete, msg of saket Mukherjee, because he is giving link of his channel on urs, but you haven't done it. Respect from heart for you bro.
My database is migrated. But no records are inserted.
@veryacademy3 жыл бұрын
Sorry sir this is showing you how to migrate the database and not the data.
@amiaynarayan5163 жыл бұрын
@@veryacademy But how to migrate data. I can see in datadump.json there are all the data. We also running 'loaddata' aren't we? What is the way to load data then. I got 'Installed 156 objects installed from 1 fixture'. But no data shows on pgadmin4 when I query (select * from table_name). any help is valuabe.
@sandeepsingh-zk3yj13 күн бұрын
@@amiaynarayan516 same issue
@Gokreative Жыл бұрын
I am not able to dump my data to postgres, it say cannot read json file
@walidramdani39534 жыл бұрын
thanks for this video
@veryacademy4 жыл бұрын
Most welcome
@yuriidezhniuk45212 жыл бұрын
Thanks! Very useful!
@sandeepsingh-zk3yj13 күн бұрын
Facing "Type mismatch" issue because all attributes are converted to text only
@fuadpalchayev72692 жыл бұрын
Thank you very much!
@nirpeshchaudhary39744 жыл бұрын
Postgres to mysql any suggestion sir..?
@veryacademy4 жыл бұрын
opendbcopy.sourceforge.net/
@asmaboudjatat6943 жыл бұрын
Thaaannnnkk youuuuu
@veryacademy3 жыл бұрын
👍
@mateolizatovich54412 жыл бұрын
Hello! In my case the table "core_core" did not appear, does anyone have or had this problem?
@NoCSDegree3 жыл бұрын
Great video!
@manikandanprabhakaran75164 жыл бұрын
Im getting content type errors while pushing my datadump to postgres. please help me
@veryacademy4 жыл бұрын
Thank you for the question. I need a little bit more information to help you here. Django version, Postgres version, what environment you are using, when do you get the error?. Else head over to stackoverflow.com/ the community can definitely help you there
@manikandanprabhakaran75164 жыл бұрын
@@veryacademy I'm using Django version 3.0.6 and postgresql v12. I tried to sync my sqlite db with postgres hosted on aws
@veryacademy4 жыл бұрын
Ok, thank you - well this is a completely different question now. First have a read of docs.aws.amazon.com/AmazonRDS/latest/UserGuide/PostgreSQL.Procedural.Importing.html
@veryacademy4 жыл бұрын
Can you copy the full error message please
@iyej4 жыл бұрын
Hello, I experienced the same errors as well and was stuck for hours trying to fix it. My solution was to delete the values in the table "django_content_type" before you run loaddata. To do this, in pgadmin, right click on the table and select "Truncate Cascade". This will clear all values in the table. You might have to do the same for "auth_permission". After which loaddata should work. Hope this helps.
@unusualanonymous67444 жыл бұрын
Im getting UnicodeDecodeError when i run command python manage.py loaddata datadump.json can you please help me how can i solve this issue. Thanks in advance
@veryacademy4 жыл бұрын
This error isn’t as straight forward to fix as you would like it to be. I recommend this link stackoverflow.com/questions/21129020/how-to-fix-unicodedecodeerror-ascii-codec-cant-decode-byte
@661bahi4 жыл бұрын
@@veryacademy This should get it correct: chcp 65001 set PYTHONIOENCODING=utf-8