ramusus / django-m2m-history

Django ManyToMany relation field with history of changes
BSD 3-Clause "New" or "Revised" License
4 stars 3 forks source link

Different versioning in postgres and mysql #1

Open ramusus opened 10 years ago

ramusus commented 10 years ago

There is ticket for supporting Microsecond precision in MySQL ORM DateTimeField https://code.djangoproject.com/ticket/19716

DateTimeField in Postgres stores microseconds, but in Mysql is not. As result versioning there will be different for the sequent operations like this:

article.publications.add(pub1)
article.publications.add(pub2)
...
article.publications.add(pubX)

In Postgres changes will be in different transactions, because of storing microseconds of each operation. But in Mysql changes sometimes will be inside one transaction if timestamp of them will corespond to the same datetime.