postgrelize / PartitionBoundSpec
Type Alias: PartitionBoundSpec ​
PartitionBoundSpec =
Readonly<{in: readonlyunknown[]; }> |Readonly<{from: readonlyunknown[];to: readonlyunknown[]; }> |Readonly<{modulus:number;remainder:number; }> |Readonly<{default:true; }>
Defined in: src/ddl/partition-types.ts:81
Bounds of a partition: { in } (list), { from, to } (range; PartitionBound.MINVALUE / MAXVALUE allowed), { modulus, remainder } (hash) or { default: true }. Values are rendered as literals.
Example ​
ts
const bound: PartitionBoundSpec = { from: ['2026-01-01'], to: ['2027-01-01'] };
await queryInterface.createPartition('events', 'events_2026', bound);