Reputation: 570
We are 3 students working on a django project with postgres database and we sync our project with eachother via a git repository like gitlab. we have different os (windows 10 and linux ubuntu 20). and we use vscode as IDE. How can we sync our entire database (data entry) via git (like sqlite) ? Is there any way to handle it via kind of converting our db to file ?
Upvotes: 1
Views: 848
Reputation: 570
I use https://www.elephantsql.com/ for it and it works! thank you
Upvotes: 1
Reputation: 4554
I would definitely go with this answer.
If you do not want to do that, use pg_dump
to export the data from the database as a text file and sync that one using git. But you might still get a lot of merge conflicts.
Upvotes: 1
Reputation: 679
Its very complicated to sync your three local database. The best way is to host your database into a cloud platform and all 3 of you connect to that.
There are free cloud platform you can use for 1 year like amazon web service, google cloud platform. You just need an active debit/credit card, it won't charge you except for amazon, it will deducted 1 dollar for account verification.
Upvotes: 2