thank you subscribe my channel @VictoriaPalanki9573974636

On Friday, January 6, 2023 at 6:12:32 PM UTC+5:30 harrisl...@gmail.com 
wrote:

> Hi, all! Curious about how folks do data migrations as we ran into an 
> issue recently:
>
> Our production deployment consists of three containers running the 
> application. When each container comes up it runs a series of startup tasks 
> include `./manage.py migrate`. Usually it's fine to run this whenever 
> because it's idempotent and Postgres should reject simultaneous schema 
> changes.
>
> So I was surprised recently when we performed a deploy that included a 
> data migration that created some objects and it created the objects 
> multiple times. I'm assuming what happened is that the containers each 
> kicked off a migration command simultaneously (thus all three containers 
> saw that the migration hadn't been run yet) and Postgres didn't block any 
> of the transactions as conflicting.
>
> How do you all avoid this?
>
> Thanks!
> Harris
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d67c79d8-02d2-4132-ae51-f5c1de6d915dn%40googlegroups.com.

Reply via email to