Function: rmDataStoreById()
rmDataStoreById(
directory): (id,version?,persistFiles?) =>Promise<void>
Defined in: data-stores.ts:104
Delete an data store (e.g. database, cache, etc.) by its id.
Optionally specify a version to delete a specific version of the data store.
Parameters
| Parameter | Type |
|---|---|
directory | string |
Returns
Function
Parameters
| Parameter | Type |
|---|---|
id | string |
version? | string |
persistFiles? | boolean |
Returns
Promise<void>
Examples
import utils from '@eventcatalog/utils';
const { rmDataStoreById } = utils('/path/to/eventcatalog');
// deletes the latest orders-db data store
await rmDataStoreById('orders-db');
// deletes a specific version of the orders-db data store
await rmDataStoreById('orders-db', '0.0.1');
import utils from '@eventcatalog/utils';
const { rmContainerById } = utils('/path/to/eventcatalog');
// deletes the latest orders-db container
await rmContainerById('orders-db');
// deletes a specific version of the orders-db container
await rmContainerById('orders-db', '0.0.1');