maxtepkeev / architect

A set of tools which enhances ORMs written in Python with more features
Other
391 stars 57 forks source link

Saving data with different values for partitioned key crashed #40

Open tayritenour opened 6 years ago

tayritenour commented 6 years ago

Is this supposed to be functional? If, for example I have a Django model that is partitioned over date and one changes the date of that object such that it would cross a partitioning boundary (to go in the next month and therefore the next partition, say), shouldn't the object simply get saved in the new partition? This appears to not be supported and gives me an IntegrityError claiming to violate the check constraint of the date field. Should this be supported or is there some behind the scenes reason this doesn't work or assumption on how this library should be used that this use case violates? Thanks

maxtepkeev commented 6 years ago

Hi, are you experiencing this behaviour with Postgres or Mysql ? Also, what version of Django do you use ?

workybee commented 6 years ago

We are using AWS RDS PostgreSQL server version 9.6 (some clients may be accessing with a v9.4 library) Were on Django 1.6 (moving forward soon ;-) Python 2.7

maxtepkeev commented 6 years ago

Hi, sorry, was on vacation, still didn't have time to check this, but there is #24 which sounds similar to your issue.