14 lines
480 B
Python
14 lines
480 B
Python
"""Posts parent table with PostgreSQL weekly range partitioning on date column."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from pipelines.orm.data_science_dev.base import DataScienceDevBase
|
|
from pipelines.orm.data_science_dev.posts.columns import PostsColumns
|
|
|
|
|
|
class Posts(PostsColumns, DataScienceDevBase):
|
|
"""Parent partitioned table for posts, partitioned by week on `date`."""
|
|
|
|
__tablename__ = "posts"
|
|
__table_args__ = ({"postgresql_partition_by": "RANGE (date)"},)
|