| 432 | } |
| 433 | |
| 434 | export function addIdAndBlockRangeAttributes(attributes: ModelAttributes<Model<any, any>, any>): void { |
| 435 | (attributes.id as ModelAttributeColumnOptions).primaryKey = false; |
| 436 | attributes.__id = { |
| 437 | type: DataTypes.UUID, |
| 438 | defaultValue: DataTypes.UUIDV4, |
| 439 | allowNull: false, |
| 440 | primaryKey: true, |
| 441 | } as ModelAttributeColumnOptions; |
| 442 | attributes.__block_range = { |
| 443 | type: DataTypes.RANGE(DataTypes.BIGINT), |
| 444 | allowNull: false, |
| 445 | } as ModelAttributeColumnOptions; |
| 446 | } |
| 447 | |
| 448 | export function addBlockRangeColumnToIndexes(indexes: IndexesOptions[]): void { |
| 449 | indexes.forEach((index) => { |