Just import the old ones from sql and then modify the tables.
Sincerely yours,
Dr Joel G Mathew
On Thu, 11 Oct 2018 at 22:12, Mohammad Aqib wrote:
> I know CLI commands to backup db and restore into another but in this case
> CLI would not work because previous db tables is different from new
Maybe you use dumpdata in json and then modify the table name, in editor
code, then loaddata in new db
https://docs.djangoproject.com/en/2.1/ref/django-admin/#dumpdata
Cheers
On Thu, Oct 11, 2018 at 10:41 AM Mohammad Aqib
wrote:
> I know CLI commands to backup db and restore into another but in
I know CLI commands to backup db and restore into another but in this case
CLI would not work because previous db tables is different from new db
tables.
So, I have backup.sql file and need to read this file and dump the values
into new db
Or another option I know, is to connect server db and exe
Depending on the SQL distribution you're using, there should be a couple
tools to do this without python using a CLI command or a basic SQL script.
If you need to do it in python, use a basic python library (again, depends
on your sql distribution) to connect to your database and execute the SQL
c
Create new database and Restore the backup file
Thanks & Regards,
Mahammad Shareef M
+919741482617
+971501340618
+971581756035
On Thu, Oct 11, 2018 at 4:01 PM Mohammad Aqib
wrote:
> Hi All,
> I have a task to migrate all data into a new database using "backup.sql"
> file.
> How to write a P
5 matches
Mail list logo