postgrelize / CreateTableOptions
Type Alias: CreateTableOptions ​
CreateTableOptions =
QueryOptionsBase&Readonly<{comment?:string;partitionBy?:PartitionKey;temporary?:boolean;unlogged?:boolean; }>
Defined in: src/query-interface/query-interface-types.ts:43
Options of createTable: a table comment, the table persistence and the common query options.
Example ​
ts
const options: CreateTableOptions = { comment: 'Blog posts', transaction };
await queryInterface.createTable('posts', { title: DataTypes.STRING }, options);
await queryInterface.createTable('scratch', { n: DataTypes.INTEGER }, { temporary: true, transaction });
await queryInterface.createTable('events', { at: DataTypes.DATE }, { partitionBy: { strategy: 'range', columns: ['at'] } });