UNPKG

@clickup/pg-microsharding

Version:
30 lines (19 loc) 891 B
[**@clickup/pg-microsharding**](../README.md) *** [@clickup/pg-microsharding](../globals.md) / allocate # Function: allocate() > **allocate**(`__namedParameters`): `Promise`\<`void`\> Defined in: [src/api/allocate.ts:14](https://github.com/clickup/pg-microsharding/blob/master/src/api/allocate.ts#L14) Ensures that all shards in the range exist on the DSN, then runs a shell script (presumably DB migration), and then optionally activates the shards. ## Parameters | Parameter | Type | | ------ | ------ | | `__namedParameters` | \{ `dsns`: `string`[]; `from`: `number`; `to`: `number`; `migrateCmd`: `string`; `activate`: `boolean`; \} | | `__namedParameters.dsns` | `string`[] | | `__namedParameters.from` | `number` | | `__namedParameters.to` | `number` | | `__namedParameters.migrateCmd` | `string` | | `__namedParameters.activate` | `boolean` | ## Returns `Promise`\<`void`\>