Skip to content

postgrelize / PartitionKey

Type Alias: PartitionKey ​

PartitionKey = Readonly<{ columns: readonly PartitionKeyElement[]; strategy: PartitionStrategy; }>

Defined in: src/ddl/partition-types.ts:63

Partition key of createTable({ partitionBy }) and of a sub-partitioned partition.

Example ​

ts
const key: PartitionKey = { strategy: 'range', columns: ['createdAt'] };
await queryInterface.createTable('events', { createdAt: DataTypes.DATE }, { partitionBy: key });

Released under the MIT License.