SectorLabs / django-postgres-extra

Bringing all of PostgreSQL's awesomeness to Django.
MIT License
699 stars 96 forks source link

Add in Hourly Partition Support #224

Open Toruitas opened 1 year ago

Toruitas commented 1 year ago

This PR adds support for Hourly partitions, using the existing time-based partitions functionality.

I've added new unit tests, and all the old unit tests still pass.

Also added an example in docs/source/table_partitioning.rst

When using hourly partitions, they start at 00:00 of any given day, in order to follow the pattern given by weekly and monthly partitions, which start on Monday and the 1st of the month respectively.