Decorator to configure table partitioning (PostgreSQL 10+).
Usage:
// Range partition by date @Partition({ type: 'range', column: 'order_date' }) @Table class Order extends Model {} // List partition by region @Partition({ type: 'list', column: 'region' }) @Table class Customer extends Model {} // Hash partition by id @Partition({ type: 'hash', column: 'id' }) @Table class Log extends Model {} Copy
// Range partition by date @Partition({ type: 'range', column: 'order_date' }) @Table class Order extends Model {} // List partition by region @Partition({ type: 'list', column: 'region' }) @Table class Customer extends Model {} // Hash partition by id @Partition({ type: 'hash', column: 'id' }) @Table class Log extends Model {}
Partition configuration options
Decorator to configure table partitioning (PostgreSQL 10+).
Usage: