Sunday, August 4, 2019

Re: database migrations

Once I have a database I wish to replicate many times for testing I just
use pg_dump to create a json file which can be reloaded into an empty
database as often as required. For that I use a script which
sequentially calls dropdb, createdb and finally psql which nominates the
json dump file created earlier.

Have a look at PostgreSQL documentation online for those commands or
similar docs for similar commands if you use a different RDBMS

Cheers



On 4/08/2019 10:34 pm, Jani Tiainen wrote:
> Hi.
>
> To me this sounds more debugging issue than migrations or database
> problem.
>
> Since it is most definitely your code that doesn't work right.
>
> Of course if youre building and testing features that fill thousands
> of entries or relatively complex data there are options.
>
> Personally I use "template database". Rather big db but at least it is
> in known state.
>
> You could have scripts to populate db after creation. Many ways to do
> that as well.
>
> la 3. elok. 2019 klo 13.19 Perceval Maturure <drperceval@gmail.com
> <mailto:drperceval@gmail.com>> kirjoitti:
>
> 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
> <mailto: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
> <mailto: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
> <https://groups.google.com/d/msgid/django-users/2D3BA6A6-EDC6-4599-B519-64593AE64A1F%40gmail.com?utm_medium=email&utm_source=footer>.
>
> --
> 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
> <mailto:django-users+unsubscribe@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHn91od2f91AxBwRKPXDHPG8D0_%3D-aMTReya%2BxH%2B_5K6O%3DWyGA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAHn91od2f91AxBwRKPXDHPG8D0_%3D-aMTReya%2BxH%2B_5K6O%3DWyGA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

--
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/76f79730-1895-3f3f-0e03-efd62f85f0f2%40dewhirst.com.au.

No comments:

Post a Comment