On 12/04/2018 9:47 AM, tango ward wrote:
> Hi Mike,
>
>
> Thanks for the advice.
>
> May I ask as well, on Django side, since we have already an existing
> system, how should I adjust the fields that are existing from the dump
> file to the Django? Should I just add fields in models.py?
Treat that as a separate task. You can do it before the migration or
after. I would preferdo it afterwards because I am more comfortable with
Postgres. And I suspect Postgres will be a better fit with Django.
However, I'm not sure what you mean exactly by adjusting fields. Your
last question above indicates you want to change the schema in an
existing Django project. You need to consider when the fields need to be
changed in the context of real-world pressures from your production
system users. It might need to be sooner rather than later and that may
force adjustments prior to the move to Postgres.
If there are problems with the existing MySQL system it would be best to
fix them before switching.
The bottom line is that preparations and testing for the move has to
happen in parallel with ongoing support and maintenance and possibly
ongoing development of the production system. When you are ready to
switch and happy that it will go like clockwork the actual switch can be
scheduled as a definable task in the ongoing workflow. All developers
will have to switch at the same time - or prior if they can have access
to your completed scripts for their personal development databases.
hth
Mike
>
> On Thu, Apr 12, 2018 at 6:42 AM, Mike Dewhirst <
mi...@dewhirst.com.au
> <mailto:
mi...@dewhirst.com.au>> wrote:
>
> On 11/04/2018 11:40 PM, tango ward wrote:
>
> Hi there,
>
> This will be my first time to migrate a database in my first
> programming job. I checked the dump file today and load it in
> MySQL benchmark to view the ERD. The database that I need to
> migrate has 48 tables and has existing data already.
>
>
> I would like to know what are the things that I need to do
> first. I'm gonna test the migration first in my local machine
> before bringing it to live production. I am currently reading
>
https://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL
> <
https://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL>.
> <mailto:
django-users%2Bunsu...@googlegroups.com>
> <mailto:
django-users...@googlegroups.com
> <mailto:
django-users%2Bunsu...@googlegroups.com>>.
> <mailto:
django...@googlegroups.com
> <
https://groups.google.com/group/django-users>.
> <
https://groups.google.com/d/msgid/django-users/CAA6wQLKcf22aXXKd6xUn%3DT6HOxHLBN7u1xcn%3DOXO3DdL%3D54XSg%40mail.gmail.com?utm_medium=email&utm_source=footer
> <
https://groups.google.com/d/optout>.
>
>
>