Saturday, August 3, 2019

Re: database migrations

Thanks Roger.


On Sun, 04 Aug 2019 at 01:19, RLM <ukeplayer01@gmail.com> wrote:

Why try to avoid re populating the database? That's the easy part, figuring what went wrong is more difficult.You don't need a lot of data to get an app working, you just need to understand what you want and how to achieve it.

When I was learning django I rebuilt my events database 20 times sometimes using the original data and sometimes by starting afresh.
If you have valid working data consider writing the data tables to csv then write that data into the new tables, it takes a couple of seconds to recreate a table once you have the fields the same as the csv. I found that when using a csv in spreadsheet it highlighted issues in the data sets

When experimenting, I suggest use SQLite and simply rename the database in the /dev app and start a new SQLite database by renaming it in the config file. That way you have previous data and new data in the same django application.

Also you could simply create new models in the current database and repopulate only the fields you need in the new model.
In all the above the main trouble will be joins. Get one small fields wrong and the join fails.

Cheers
Roger

On 3/8/19 8:18 pm, Perceval Maturure wrote:
Question is what's the best way forward to avoid situations where u will have to create a new database if ur applications do not work with the current databases so as to avoid populating the database with data again




Sent from my iPhone

On 02 Aug 2019, at 14:39, Perceval Maturure <drperceval@gmail.com> wrote:

Dear all
creating a new database as applications increase has been one of the solutions to some of the errors i have encountered especially after adding a django cms by hand in my development environment.

i cant imagine a situation like that in a production environment as this will mean re-entry of data.
please share some thought*****
Regards
--
Perceval Maturure
083 303 9423

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2D3BA6A6-EDC6-4599-B519-64593AE64A1F%40gmail.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/99e1d459-d31f-a527-c461-508bb13147b9%40gmail.com.
--
Sent from Gmail Mobile

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFZtZmCDWc4rPujYWTKKnobWh3NV6J2KZutHa0p548HML6Tk0w%40mail.gmail.com.

No comments:

Post a Comment