maxtepkeev / architect

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

Postgresql 11 - Trigger for declarative partitioning #62

Open shalikashvili opened 5 years ago

shalikashvili commented 5 years ago

Now that Postgresql 10 and 11 support declarative partitioning, it would be nice if the architect install decorator had an option where the BEFORE INSERT trigger could be created that generates CREATE TABLE {tablename} PARTITION OF {parent_table}, rather than the (legacy) "INHERITS" form.

virusdefender commented 5 years ago

You can try this https://github.com/chaitin/django-pg-partitioning